This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, 1. Is the wait and notify method called on the thread or on the object? 2. Is it also possible that a thread in the waiting state, never get executed even ater the notify method has called upon it? Clement
Clement 1. wait and notify are instance methods of the Object class so they are called on objects not on the class themselves. These methods are called on instances of type Thread. 2. first, you can't call notify on a specific Thread. It is possible that a Thread that had been waiting for a certain condition can get woken up but not executed becasue the condition still has not been met.