Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html" rel="nofollow">Thread documentation</a> ,</p> <h2>A thread created by a daemon thread is initially also a daemon thread</h2> <p>Each thread may or may not also be marked as a daemon. When code running in some thread creates a new Thread object, the new thread has its priority initially set equal to the priority of the creating thread, and is a daemon thread if and only if the creating thread is a daemon. </p> <h2>When an application begins running, there is one non-daemon thread, whose job is to execute main().</h2> <p>When a <code>Java Virtual Machine starts up, there is usually a single non-daemon thread</code> (which typically <code>calls the method named main</code> of some designated class). The Java Virtual Machine continues to execute threads until either of the following occurs:</p> <ul> <li><p>The exit method of class Runtime has been called and the security manager has permitted the exit operation to take place.</p></li> <li><p>All threads that are not daemon threads have died, either by returning from the call to the run method or by throwing an exception that propagates beyond the run method.</p></li> </ul> <h2>Daemon and Non-Daemon Thread</h2> <p>A “daemon” thread is one that is supposed to provide a general service in the background as long as the program is running, but is not part of the essence of the program. Thus, when all of the non-daemon threads complete, the program is terminated. Conversely, if there are any non-daemon threads still running, the program doesn’t terminate.</p> <p>For more explaination refer <a href="http://www.linuxtopia.org/online_books/programming_books/thinking_in_java/TIJ315_005.htm" rel="nofollow">ThinkingInJava</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload