| Author |
daemon thread.
|
jaman tai
Ranch Hand
Joined: Sep 26, 2005
Posts: 37
|
|
With respect to User and Daemon threads: a) Daemon threads can not be destroyed b) Running User threads prevent a JVM from terminating program c) Running Daemon threads prevent a Java VM from terminating program d) Daemon threads can not be grouped together e) The JVM can terminate program when only daemon threads are running answer: b, e? why e is correct?
|
 |
Pranav Shukla
Ranch Hand
Joined: Oct 05, 2005
Posts: 64
|
|
Daemon threads exist only to serve User threads. Typically they will provide services to the User Threads and User Threads will do the real "work" in the program. So if there doesn't exist any live User Thread, the JVM may choose to terminate the program even if there are daemon threads running.
|
Pranav Shukla
SCJP, SCWCD, SCBCD
|
 |
Barry Gaunt
Ranch Hand
Joined: Aug 03, 2002
Posts: 7729
|
|
|
You can find out why e is correct by looking up the definition of a Daemon thread.
|
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
|
 |
 |
|
|
subject: daemon thread.
|
|
|