What is a Daemon thread?
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.
daemon threads complete the program is terminated. Conversely, if there are any non-daemon threads still running the program doesn' t terminate.