Search your topic in Java2share
Home > FAQs
eXTReMe Tracker


Multi Threading FAQs


Untitled Document

Q57.  How we can check Daemon nature of a Thread?
Ans.   We can check Daemon nature of a Thread by using isDaemon() method.
Q58.  Is it possible to change a Daemon nature of a Thread?
Ans.  Yes, we can change Daemon nature of a Thread by using setDaemon() method.
Q59. Is main thread is Daemon or non-daemon?
Ans.  By default main thread is always non-daemon nature.
Q60. Once we created a new thread is it daemon or non-daemon.
Ans.   Once we created a new Thread, The Daemon nature will be inheriting from parent to child. If the parent is Daemon the child is also Daemon and if the parent is non-daemon then child is also non-daemon.