• Post Reply Bookmark Topic Watch Topic
  • New Topic

Daemon Thread  RSS feed

 
Vandiyadevan senthan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

What is Daemon thread?Can we say public static void main() is of this type?

Thanks in advance.
Senthan
 
Srinivasa Raghavan
Ranch Hand
Posts: 1228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi The same question was asked many times recently. Please search this forum & the SCJP forum to get a more idea about it.
One such thread .
[ November 11, 2005: Message edited by: Srinivasa Raghavan ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A daemon thread is simply one for which Thread.isDaemon() returns true. When the only running threads in a JVM are daemon threads, the JVM will exit.

Originally posted by Vandiyadevan senthan:

Can we say public static void main() is of this type?


No, a method is not a Thread, and the Thread in which main() runs is not a daemon thread.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!