aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Is knowledge of Daemon threads required for 1.4? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Is knowledge of Daemon threads required for 1.4?" Watch "Is knowledge of Daemon threads required for 1.4?" New topic
Author

Is knowledge of Daemon threads required for 1.4?

Brian Joseph
Ranch Hand

Joined: May 16, 2003
Posts: 160
I noticed a couple of questions on these, and my book did not cover them. Is it worth knowing these for the 1.4 exam?
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Daemon threads aren't really that different from a normal thread. The key is that they are then dependent upon another process. When that thread dies, so too, does the daemon thread.
I would expect daemon threads to appear on the exam.


SCJP Tipline, etc.
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

I think the main things you need to understand about Daemon threads is that the JVM will exit once there are no non-Daemon threads (user threads) running. Also, when you spawn a thread it will get the same status as the thread that created it, unless explicitly set using setDaemon(boolean).
Anupam Sinha
Ranch Hand

Joined: Apr 13, 2003
Posts: 1088
setDaemon(boolean) can only be used if the thread has not been started.
[ June 20, 2003: Message edited by: Anupam Sinha ]
Brian Joseph
Ranch Hand

Joined: May 16, 2003
Posts: 160
Thanks for those quick tips!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is knowledge of Daemon threads required for 1.4?