| |
GeekInterview.com > Interview Questions > J2EE > Core Java
| Print | |
Question: Inter Thread Communication
Answer: What are all the methods used for Inter Thread communication and what is the class in which these methods are defined? |
| August 08, 2009 08:34:55 |
#5 |
| satyanandr |
Member Since: August 2009 Total Comments: 2 |
RE: Inter Thread Communication |
Two or more threads are communication via wait(), notify() and notifyAll() method of an Object class.
wait(): method will lock the monitor of the thread to not process.
notify(): method will wake the thead which undergoes waiting state, the wait state is waiting to called by notify or notifyAll()
notifyAll(): method will wake the theads which undergoes waiting state. |
| |
Back To Question | |