Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Thread methods?  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wait(),notify(),notifyAll() methods are highly used in Threading. But theses 3 methods are in java.lang.Object class. not in Thread class .why?
 
Sheriff
Posts: 21372
91
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please SearchFirst. I can't even remember how often this question has been asked already.
 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Additionally, if you understand what there methods are for and how to use them, you'll understand why they must be defined on Object and not just on Thread.
 
Getting married means "We're in love, so let's tell the police!" - and invite this tiny ad to the wedding:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!