dcsimg
Why wait(),notify() and notifyall() in Object class in java
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   RamaKrishna_Ravuri
Posted On:   Sunday, May 13, 2007 02:26 PM

Hello Buddies,

I want to know why wait(),notify() and notifyall() methods are placed in Object class in java instead Thread class..Please let me know..Thanks in advance..

Re: Why wait(),notify() and notifyall() in Object class in java

Posted By:   WarnerJan_Veldhuis  
Posted On:   Sunday, May 13, 2007 05:33 PM

Because it belongs to the behaviour of an object and not of t a thread. A thread may access an object, or wait until another object is done.
About | Sitemap | Contact