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
Can I run seam with jdk 1.4 and earlier?
Can I use multiple html form elements with the same name?
Define aop(assepct oriented programing)?
What restrictions are placed on the values of each case of a switch statement?
Do we need to override service() method
Why are my checkboxes not being set from on to off?
difference between ejb,struts,hibernate,spring and jsp
What is JTS?
Difference between loadclass and class.forname?
What is synchronization and why is it important?
What do you know about seam?
What is the relationship between the canvas class and the graphics class?
Describe, in general, how java's garbage collector works?
How is a java object message delivered to a non-java client?
Is there a guarantee of uniqueness for entity beans?