If Object.wait( ) method is called from a synchronized method,then the current thread will move to the waiting state until some other thread invokes the notify ( ) or notifyAll ( ) method on this object.
Can any body tell me that when the thread moves to the waiting state,will it release the lock ?
Joined: Aug 02, 2004
(if it didn't, no other thread could call notify...because you have to have the lock to call those methods)
Remember, javadoc is your friend! [ January 06, 2005: Message edited by: Dave Wood ]
Co-Author of <a href="http://www.oreilly.com/catalog/jswing2" target="_blank" rel="nofollow">Java Swing</a><br />Co-Creator of <a href="http://www.sun.com/training/catalog/courses/CX-310-055.xml" target="_blank" rel="nofollow">SCJP 5.0</a> and <a href="http://www.sun.com/training/certification/java/associate_beta.xml" target="_blank" rel="nofollow">SCJA</a> exams
Joined: Aug 03, 2002
"Puja" welcome to JavaRanch. Please read our JavaRanch Naming Policy and change your displayed name to conform with it. We require a <first name> <family name> format, preferably your real names. Thanks -Barry