Java Programming - Threads - Discussion


Which class or interface defines the wait(), notify(),and notifyAll() methods?

[A]. Object
[B]. Thread
[C]. Runnable
[D]. Class

Answer: Option A


The Object class defines these thread-specific methods.

Option B, C, and D are incorrect because they do not define these methods. And yes, the Java API does define a class called Class, though you do not need to know it for the exam.

Prathap said: (Nov 26, 2015)  
Thread is also super class for this method I think.

Post your comments here:

Name *:

Email   : (optional)

» Your comments will be displayed only after manual approval.