wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Why Wait() and notify() methods defined in Object class? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Why Wait() and notify() methods defined in Object class?" Watch "Why Wait() and notify() methods defined in Object class?" New topic
Author

Why Wait() and notify() methods defined in Object class?

Mihir Patel
Greenhorn

Joined: Apr 26, 2011
Posts: 18

Hi,

Please someone explain, why wait(), notify() and notifyAll() methods are defined in Object class rather then Thread class even though they are thread related methods?

Thanks...
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10523
    
    9

Check this FAQ entry http://www.coderanch.com/how-to/java/SCJP-FAQ#notifyObject


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Why Wait() and notify() methods defined in Object class?