Why can't we call the start method twice on a same instance of the Thread object?

后端 未结 5 1445
孤街浪徒
孤街浪徒 2020-12-03 03:16

I was reading about threads and found that we can\'t call the start method twice on the same thread instance. But I didn\'t understand the exact reason for the same. So why

5条回答
  •  执笔经年
    2020-12-03 03:50

    according to thread life cycle, once thread is 'dead' you can not restart it.You only can start new thread invoking start() method.

    Thread can be bought to Running state from Runnable state not from Dead state.

提交回复
热议问题