Test it Now

Output

daemon thread work
user thread work
user thread work

Note: If you want to make a user thread as Daemon, it must not be started otherwise it will throw IllegalThreadStateException.

File: MyThread.java

Test it Now
Output:exception in thread main: java.lang.IllegalThreadStateException
Next TopicJava Thread Pool




Hot Tutorials

Contact US

Email:jjw.quan@gmail.com

Daemon Thread
10/30