File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes deamon 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 "deamon" Watch "deamon" New topic
Author

deamon

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi All,
I just found someone passed SCJP exam and mentioned deamon in the real test. But I have no idea about deamon. Also RHE doesn't mention it. Should I be prepared fo it?
Mike
chetan nain
Ranch Hand

Joined: Jun 21, 2000
Posts: 159
the term daemon is defined in the context of threads (in java).
1. daemon threads exist to serve user threads.
2. an example of a user thread is the main thread.
3. a daemon thread is implicitly created prior to creation of the
user thread.
3. a thread may be set as a daemon thread using the setDaemon() method of the Thread class. this method has boolean return type.
4. however, invocation of above method on a running thread results in IllegalThreadState exception.
thats about all i can share
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi, Chetan!
Thank you for your help. Now I know something about Daemon.
Mike
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Ajith is it possible for you to give some more explanation on Daemon Thread.
Really appreciate your help.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Let me add something to this.
setDaemon() marks this thread as either a daemon thread or a user thread. JVM will exit when the only threads running are all daemon threads. This method must be called before the thread is started.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
This Discussion is nice.
http://www.javaranch.com/ubb/Forum24/HTML/001830.html
Now I got some basic idea about this. If anyone wants to learn more just give a search on deamon and read. Really interesting!.
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Subha,
I guess you found what you wanted. daemon threads have been discussed here before more than once. You are always welcome to ask specific questions if you have any
Ajith


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Marcela Blei
Ranch Hand

Joined: Jun 28, 2000
Posts: 477
Look at my last reply please. I founded a wrong concept http://www.javaranch.com/ubb/Forum24/HTML/001830.html
 
jQuery in Action, 2nd edition
 
subject: deamon