![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
if u can clear yr problem by this. A daemon thread is a thread that runs for the benefit of other threads.Daemon threads run in background(i.e when processor time is available that would otherwise go to waste).Unlike conventional user threads,daemon threads do not prevent a program from terminating.The garbage collector is a daemon threads.Non daemon threads are conventional user threads.We designate a thread as a daemon with the method call setDaemon(true); A false argument means that the thread is not a daemon thread.aprogram can include a mixture of daemon threads and non-daemon threads.when only daemon threads remain in a program, The program exits.if a thread is to be a daemon,it must be set as such before it's start method is called or an IllegalThreadStateException is thrown.method isDaemon returns true is a daemon thread and false otherwise. Replies: |
Sponsored Links
|