Explain the purposes of methods wait(), notify(), notifyAll
()?
Answer Posted / tek
All the three methods are called in synchronized block or
method.
wait(): Thread calling wait method will go to the waiting
state and it will loose its monitor. It will execute only
if it is notified by the other threads.
notify(): To notify thread which is waiting for the concern
object.
notifyAll(): To notify all the threads which are in waiting
state.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What value does read() return when it has reached the end of a file?
Why use POJO when I can use hashmap
Difference between hashmap and hashtable?
What are the diff types of exception?
What value does readline() return when it has reached the end of a file?
Define prototype?
What is aop(assepct oriented programing)?
Why use a datasource when you can directly specify a connection details? (in a J2EE application)
wahts is mean by dynavalidatorform in struts/
Which class is the immediate superclass of the menucomponent class?
To what value is a variable of the string type automatically initialized?
What if the static modifier is removed from the signature of the main method?
Explain what is synchronization?
Where we can write Rmi registry in the code, without having to write it at the command prompt?
Describe activation process?