This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Related to thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Related to thread" Watch "Related to thread" New topic

Related to thread

Angela Narain
Ranch Hand

Joined: Apr 14, 2001
Posts: 327
Suppose a thread�s run() method has already executed.
Now the thread is considered to be dead. But can this thread be started again ?
Mikael Jonasson
Ranch Hand

Joined: May 16, 2001
Posts: 158
You can always access the class directly, for instance call the run() method directly. It will hoever not start as a thread, but run in the current thread.
Jyotsna Umesh
Ranch Hand

Joined: May 09, 2001
Posts: 94
No, a dead thread can't be restarted by calling run method, however, you can create new instance of the thread and runit by calling start method.
[This message has been edited by Jyotsna Umesh (edited June 19, 2001).]
It is sorta covered in the JavaRanch Style Guide.
subject: Related to thread
It's not a secret anymore!