Marking a thread as a "daemon" thread means that the JVM no longer waits for it to complete before exiting. Your
Java application terminates when there are no longer and "non-daemon" threads executing. When the last non-dameon thread completes, the application exits. If there is one or more "daemon" threads running when that occurs, those threads automatically quit.
Daemon threads are great for "support" tasks that constantly run. Garbage collection is a perfect example. It's something that runs continuously (or periodically) but, when all of the other processing is completed, there's no reason for garbage collection to continue. That's a perfect use for a daemon thread.
I hope that helps,
Corey