Well, the actual
word is daemon thread but, they are sometimes referred as
demon thread as they just keep on running and haunt you back
A daemon thread is a thread that exists/runs in the background. It basically is a low priority thread.
The use of daemon thread is that JVM exits when the last running thread finishes. In a GUI this typically happens when the last window is closed (which ends the dispatcher thread).If you set a Thread to daemon status then that thread doesn't prevent the JVM from exiting if it's still running.So it's used for background threads. Typically these threads speand most of their time waiting for some condition to arise which they then quietly handle. They might be waiting for an incoming socket connection. They might wake up every five minutes and check that a file hasn't been updated. They might be waiting for some task to be added to a queue which they then execute. etc. etc.
You can refer
this link for more info.
A green threads is a thread that is scheduled by a JVM itself.
Wikipedia has a good description. Refer
this link.