Theard
Title
Question
How a dead thread will be restarted?
Java Subclassing-and-Method-Overriding 00-01 min 0-10 sec
Answers:
The question you have asked is not related to the spoken tutorial topics.
However, a dead thread cannot be restarted.
However, a dead thread cannot be restarted.
Dead thread can not be restarted , b'coz Dead thread is the thread which has been executed successfully and has been terminated .
All the thread which has been terminated can not be restarted . Only those thread can be restarted which have a abnormal termination
due to interrupt by any other thread , suspending etc .
You could always create a new Thread object using the dead thread in constructor and then call start method on the new Thread. This is possible since all new Thread instances implement the Runnable interface.
Login to add comment