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
Java Multitasking
Using Join for Threads
Starting JavaThread - Quiz
Coordinating Java Threads - Quiz
Thread States -Quiz
Java Input Output
Java IO Package
Data InputStream
JavaClass InputOutput Review
Java IO Quiz
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