This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes setDaemon not present in Runnable Interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "setDaemon not present in Runnable Interface" Watch "setDaemon not present in Runnable Interface" New topic
Author

setDaemon not present in Runnable Interface

Santosh Kumar Nayak
Ranch Hand

Joined: Aug 02, 2011
Posts: 95
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

Joined: Sep 14, 2013
Posts: 10

Because Runnable has nothing to do with threads, it's just an interface with run() method, which is assumed to be executed by thread.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: setDaemon not present in Runnable Interface