Privacy Policy Terms Of Use. Copyright © 2006-2010 Java Tutorials and Examples.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
Submitted by dagdu on Tue, 02/07/2012 - 13:52
1 answer
Similar entries
- SCWCD Certification, Online Certification Resources
- For become a successful carrer in java developer , what shoul i do......???, i have done my BCA, nd prusing MCA with Icfai University...., nd i have completed java course with NIIT but not in good manner....so pls help me....!!!!
- SCWCD Exam Simulators, SCWCD Exam Simulator Resources
- SCWCD Book, List of Excellent SCWCD Certification Books
- SCWCD Tutorials, Java Developer's SCWCD Resources
- SCWCD Mock Exams, SCWCD Sample Questions
- SCJP Certification Books, Certification books for Java Programmer Certification
- SCJP Exam Objectives, Java Developer SCJP Resources

object.wait() sends the current thread into the "Not Runnable" state, like sleep(), but with a twist. Wait is called on a object, not a thread; we call this object the "lock object." Before lock.wait() is called, the current thread must synchronize on the lock object; wait() then releases this lock, and adds the thread to the "wait list" associated with the lock. Later, another thread can synchronize on the same lock object and call lock.notify(). This wakes up the original, waiting thread. Basically, wait()/notify() is like sleep()/interrupt(), only the active thread does not need a direct pointer to the sleeping thread, but only to the shared lock object.