Friday, 22 April 2016

Once a thread has been started can it be started again ?


No
A thread can be started only once in its lifetime.

What will happen if you try starting a thread which has been already started once ?

An IllegalThreadStateException is thrown, which is a runtime exception.


A thread in runnable state or a dead thread can not be restarted.
      

No comments:

Post a Comment

Note: only a member of this blog may post a comment.