Organizational Research By

Surprising Reserch Topic

what is the use of daemon thread and which method is used to create the daemon thread?



asked Sep 13, 2013 in Core java by ashish singh
edited Sep 12, 2013
0 votes
58 views



Related Hot Questions

2 Answers

0 votes
Daemon threads are threads with low priority and runs in the back ground doing the garbage collection operation for the java runtime system. The setDaemon() method is used to create a daemon thread. These threads run without the intervention of the user. To determine if a thread is a daemon thread, use the accessor method isDaemon().When a standalone application is run then as long as any user threads are active the JVM cannot terminate, otherwise the JVM terminates along with any daemon threads which might be active. Thus a daemon thread is at the mercy of the runtime system. Daemon threads exist only to serve user threads.
answered Sep 13, 2013 by ashish singh
edited Sep 12, 2013
0 votes
Daemon threads are threads with low priority and runs in the back ground doing the garbage collection operation for the java runtime system. The setDaemon() method is used to create a daemon thread. These threads run without the intervention of the user. To determine if a thread is a daemon thread, use the accessor method isDaemon().When a standalone application is run then as long as any user threads are active the JVM cannot terminate, otherwise the JVM terminates along with any daemon threads which might be active. Thus a daemon thread is at the mercy of the runtime system. Daemon threads exist only to serve user threads.
answered Sep 13, 2013 by ashish singh
edited Sep 12, 2013

...