posted 18 years ago
Wait and notify are used to communicate between two or more threads. We wait to obtain a lock on an object and notify others when we make a lock available. The object we're all playing with is at the center of all this communication so the methods go very naturally there. We can wait or notify on any object of any type, so the methods wind up on the root Object class.
It would have been possible to define all these methods on Thread and make them take an object argument: someThread.wait(someObject) instead of someObject.wait() but the designers chose not to do that.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi