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 are various types of class loaders used by jvm?
Is jvm a overhead?
What is ioc concept & explain it?
Explain the difference between object state and behavior?
What is the difference between long.class and long.type?
Which are the different segments of memory?
What is the difference between RMI registry and OS Agent?
Can I have an action without a form?
Can I use javascript to submit a form?
What is the difference between java class and bean?
What modifiers may be used with an inner class that is a member of an outer class?
What is the relationship between an event-listener interface and an event-adapter class?
Write a singleton program?
What is an abstract method?
What is aop(assepct oriented programing)?