posted 21 years ago
Narasimha,
You cannot call wait() and notify() from a static context without a third party object.
Reason:
no object lock to wait on.
Remember wait and notify are not static methods they cannot be called from a static context unless you call it with an object instance, in which case you have to own its lock in the first place, hence the synchronized block.
K&B explain it very well.
Sindhur.
[ March 06, 2004: Message edited by: Sindhur Sat ]