Question: what is difference between daemon and non daemon thread?
Answer: Difference between Daemon threads and non-Daemon thread (user thread) The main difference between Daemon thread and user threads is that the JVM does not wait for Daemon thread before exiting while it waits for user threads, it does not exit until unless all the user threads finish their execution.