Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why wait(), notify()..... in java.lang.Object  RSS feed

 
Srinu Nanduri
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one please explain why the wait(), notify() and notifyAll() methods are defined in java.lang.Object instead of java.lang.Thread ?
Are there any design issues for so ?
 
Mani Ram
Ranch Hand
Posts: 1140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This has been discussed many times before. Search this forum, you will get many threads.
Here is one: Why are notify() & notifyAll() are in Object class??where aswe call from Thread class
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!