A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Threads and Synchronization
setDaemon not present in Runnable Interface
Santosh Kumar Nayak
Joined: Aug 02, 2011
Sep 14, 2013 22:31:18
Why the setDaemon() is not present when we implement the Runnable Interface.
The method is only present when we extend the Thread class.
Joined: Sep 14, 2013
Sep 14, 2013 23:16:24
Because Runnable has nothing to do with threads, it's just an interface with run() method, which is assumed to be executed by thread.
I agree. Here's the link:
subject: setDaemon not present in Runnable Interface
is the "implement" included in the "is a" relationship?
What exactly is a Marker Interface?
Calling methods before start()
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014