
Java Thread and I/O Quiz

Quiz
•
Computers
•
University
•
Medium
Aswini G
Used 1+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to create a thread in Java?
Extending the Thread class
Implementing Runnable interface
Both a and b
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method must be overridden when implementing the Runnable interface?
start()
stop()
run()
init()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to start a thread execution?
run()
start()
execute()
initialize()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the synchronized keyword?
To speed up thread execution
To prevent thread execution
To control access to critical sections
To terminate threads
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following are ways to synchronize a block of code?
synchronized method
synchronized statement
synchronized object
Both a and b
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a critical section?
Part of the code where memory is freed
Part of code accessed by multiple threads
A section used only once
None of the above
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is used for inter-thread communication?
notify()
wait()
notifyAll()
All of the above
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Kuis Internet1 L2324

Quiz
•
University
20 questions
Quiz sul Computer

Quiz
•
9th Grade - University
20 questions
Kuis 1 Sistem Terdistribusi

Quiz
•
University
20 questions
UAS Sistem Operasi

Quiz
•
University
25 questions
Introduction to Java

Quiz
•
University
20 questions
General Knowledge (ICT EDITION)

Quiz
•
10th Grade - University
20 questions
Final Quiz

Quiz
•
University
27 questions
QUIZ02

Quiz
•
University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade