aspose file tools*
The moose likes Java in General and the fly likes thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "thread" Watch "thread" New topic
Author

thread

sri jaisi
Greenhorn

Joined: Sep 02, 2006
Posts: 23
we use wait.notify,notifyall in threads.but why we have these three methods in object class rather than in thread class

thankz
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Every object has a lock of its own. When you say wait() you want that object's lock and thats why the methods are defined in the Object class.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: thread