A daemon thread is a thread that is doing some tasks in the background like handling requests or various chronjobs that can exist in an application.
When your program which only has daemon threads remaining, will exit. This is because usually these threads work together with normal threads and provide background handling of events.
You can specify that a Thread is a daemon one by using a setDaemon method, they usually don't exit, neither they are interrupted.. they just stop when an application stops.