ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

What are daemon threads?

Threads that work in the background to support the runtime environment are called daemon threads.

Eg garbage collector threads.

When the only remaining threads in a process are daemon threads, the interpreter exits. This makes sense because when only daemon threads remain, there is no other thread for which a daemon thread can provide a service.

You cannot create a daemon method but you can use

public final void setDaemon(boolean isDaemon) method to turn it into one.

 

Related Posts Plugin for WordPress, Blogger...
Flag Counter