my dog learned polymorphism
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


Win a copy of Building Microservices this week in the Design forum!
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: 10747
    
    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!]
 
Have you checked out Aspose?
 
subject: Why Wait() and notify() methods defined in Object class?
 
It's not a secret anymore!