posted 21 years ago
The main difference between a User Thread and a Daemon Thread is that the program terminates when all user threads have stopped running.
A good example of a Daemon thread is the garbage collection thread. It just runs in the background like some sort of unseen ghost or demon.
The daemon attribute of a thread is just used to tell the JVM if it is OK to terminate the program even if the thread is still running.
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>