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
Why do I get a duplicate name error when loading a jar file?
What is the relationship between local interfaces and container-managed relationships?
Explain the difference between object state and behavior?
What is synchronization and why is it important?
How to pass parameters in RMI?
What is the map interface?
What are the different types of exception?
Which container method is used to cause a container to be laid out and redisplayed?
What is the difference between session and entity beans?
How to determine SGA site?
Is jvm a overhead?
What is table mutation and how do you avoid it?
What are local interfaces? Describe.
Name the class that is used to bind the server object with RMI Registry?
Explain RMI Architecture?