Win a copy of Head First Agile this week in the Agile forum!
    Bookmark Topic Watch Topic
  • New Topic

Thread questions  RSS feed

 
Harvinder Singh
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Report post to moderator
q1.What r daemon threads?
q2.The class in which main method is declared nither implements Runnable
nor extends thread then how JVM treats main as a non-daemon
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
1) A very Frequently Asked Question: See Frank Carver's answer here.
2) main() runs in a Thread, but you don't see the run() method from that thread -- it's internal to the JVM implementation. But somewhere, effectively, there's a run() method that looks like

OK?
[ October 04, 2003: Message edited by: Ernest Friedman-Hill ]
 
Marilyn de Queiroz
Sheriff
Posts: 9080
12
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is a duplicate of this post. Please don't cross post. Thanks.
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!