aspose file tools*
The moose likes Java in General and the fly likes Thread questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

Thread questions

Harvinder Singh
Ranch Hand

Joined: Feb 14, 2003
Posts: 90
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


Hard work beats talent<br />when talent doesn't work hard.<p> - Tim Notke
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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 ]

[Jess in Action][AskingGoodQuestions]
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9047
    
  10
This is a duplicate of this post. Please don't cross post. Thanks.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Thread questions