What is the syntax of Daemon Thread in java?
If it's the same as the syntax of simple thread, how does JVM know which thread is Daemon thread??
Because as far as I know JVM treats simple Thread and Daemon Thread differently. For example if main program is going to exit and there are some threads still running JVM will wait for the threads to terminate. While if those threads are Daemon Threads JVM will simply exit the program and will terminate the Daemon Threads forcefully.