This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft 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 Java 8 in Action this week in the Java 8 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).]
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Related to thread
Similar Threads
Tech Word Game
Thread and Object
Thread & Synchronization
WA #1.....word association