This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setDaemon not present in Runnable Interface

 
Santosh Kumar Nayak
Ranch Hand
Posts: 143
Eclipse IDE IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why the setDaemon() is not present when we implement the Runnable Interface.

The method is only present when we extend the Thread class.
 
Sergey Korytnikov
Greenhorn
Posts: 11
Eclipse IDE Java Slackware
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because Runnable has nothing to do with threads, it's just an interface with run() method, which is assumed to be executed by thread.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic