Examine code below:
When I set t1.setDaemon(true) the following output is produce.... ....and when I set t1.setDaemon(true) and t2.setDaemon(true)the following output is produce: I'm expecting that when you set
t1 as a daemon
thread it should be stop executing when the
main thread dies. Why does daemon thread
t1 still execute when its parent thread
main thread is already
in a dead state?