JavaDeploy
SiteMap
Java Certification
Java Beans
Java-OO Concepts
Java Multitasking
«Prev
Next»
Java Basics
System Object Model
Interfaces Packages
Describe Java Package
Importing Packages
Access Control
Interface Role
Reclaiming Memory
Garbage Collection
Forcing GarbageCollection
Project Access Control
OOA Concepts
Java Exceptions
Exceptions - Quiz
Catching Exceptions-Quiz
Finally-Keyword -Quiz
Throwing Exceptions - Quiz.
Catching Exceptions Baseball
Common Java Exceptions
122
Java Multitasking
Using Join for Threads
Starting JavaThread - Quiz
Coordinating Java Threads - Quiz
Thread States -Quiz
Intro Java Input/Output
Java Io Package
Java System.in Read Input
Data Input Stream
File Class To Access Files
Save Restore Draw Applet Project
Java Class Input Output Review
Java Stream Programming Conclusion
Java Thread States and Synchronization - Quiz
Each question is worth one point. Select the best answer or answers for each question.
1.
The code
t.sleep(2000);
will
Please select the best answer.
A.
Put a thread to sleep for 2,000 seconds
B.
Put a thread to sleep for 2 seconds
C.
Not compile
2.
If a thread's state becomes "not running" because its
wait()
method is invoked, which method needs to be invoked to test all waiting threads to see if they should wake up again?
Please select the best answer.
A.
wakeUp();
B.
notify();
C.
notifyAll();
3.
A thread will end its life when:
Please select the best answer.
A.
You invoke
wait()
for the thread
B.
You invoke
sleep()
for the thread
C.
The thread's
run()
method ends
Your score is 0.0
Submit
Quiz Explanation