Hi Swapnil,
Daemon thread is at the mercy of
java runtime system. JVM can terminate at any time. Whereas user thread will always be successfully terminated.
If no user thread is running, then JVM can terminate daemon thread in between.
you can
test above statments by setting a child thread as daemon thread before starting it.
You can see in that case when main terminates, child may terminate even without successful completion.
Whereas, if child thread is user thread, then child will definitely be completed even if main terminates before that.
Each child thread inherits its user status from main thread.
Regards
Naseem
[ June 30, 2006: Message edited by: Naseem Khan ]