This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
    Bookmark Topic Watch Topic
  • New Topic

Thread questions

 
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
Marshal
Pie
Posts: 24211
35
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: 9063
12
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is a duplicate of this post. Please don't cross post. Thanks.
 
    Bookmark Topic Watch Topic
  • New Topic