Life cycle of a Thread in Java


NewState:

Once we created an instance of Thread class Then The Thread will be New state.

Runnable state:

When we call start() method Then The thread will be entered into Runnable state.

Runnable state:

When we call start() method Then The thread will be entered into Runnable state.

Non-Runnable state:

In This state thread will Block for some period (or) some circumstance.A Thread Remains in a Not-runnable state until a special transition occurs.


No comments:

Post a Comment