• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setDaemon

 
Zak Nixon
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone explain this method?
Thread t = new Thread();
setDaemon(t);
Thanks
Zak
 
Harwinder Bhatia
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Zak

Thread t = new Thread();
setDaemon(t);

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.
Thanks
Harwinder
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic