The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes setDaemon Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "setDaemon" Watch "setDaemon" New topic


Zak Nixon
Ranch Hand

Joined: Sep 27, 2003
Posts: 126
Can anyone explain this method?
Thread t = new Thread();
Harwinder Bhatia
Ranch Hand

Joined: Oct 17, 2003
Posts: 150
Hi Zak

Thread t = new Thread();

The setDaemon method in the Thread class is 'not' overloaded and is defined as:

It takes a boolean argument and 'not' a Thread object as argument. If your example is referring to the setDaemon method in the Thread class, then it will 'not' compile. If it's overridden in your custom class, then it's a whole different story.
Hope that will help.
I agree. Here's the link:
subject: setDaemon
jQuery in Action, 3rd edition