• 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