JVM will accomplish the work when a last non-daemon thread execution is completed. By default, JVM will create a thread as nondaemon but we can make Thread as a daemon with help of method setDaemon(true)
. A good example of Daemon thread is GC thread which will complete his work as soon as all nondaemon threads are completed.
↧
Answer by Arman Tumanyan for What is a daemon thread in Java?
↧