File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Daemon Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Daemon Threads" Watch "Daemon Threads" New topic

Daemon Threads

Lalitha Gottumukkula
Ranch Hand

Joined: May 24, 2005
Posts: 45

"The virtual machine exits whenever all non-daemon threads have completed."

What does this mean ?

What are Daemon threads and how do they differ from user threads ?
Pls. explain the behaviour of daemon threads with an example.

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
first spot in google

java amateur
nagaraj reddy
Ranch Hand

Joined: Feb 21, 2005
Posts: 43
As for as My Knowledge Concerned

in java u acn set a thread as Daemon thread by using setDaemon() method.Daemon threads will be running in background although your program completed.
I agree. Here's the link:
subject: Daemon Threads
It's not a secret anymore!