Daemon thread is like daemon process which is responsible for managing resources,a daemon thread is created by the Java VM to serve the user threads.example updating system for unix,unix is daemon process.child of daemon thread is always daemon thread,so by default daemon is false.you can check thread as daemon or user by using "isDaemon()" method.so daemon thread or daemon process are basically responsible for managing resources.for example when you starting jvm there is garbage collector running that is daemon thread whose priority is 1 that is lowest,which is managing memory.jvm is alive as long as user thread is alive,u can not kill daemon thread.jvm is responsible to kill daemon threads.
↧