Life cycle of a Thread
A life cycle of a thread consists of various stages such as
- New,
- Runnable,
- Running,
- Waiting and,
- Terminated(Dead).

New
A new thread remains in the new state until the program starts the thread.
Runnable
After the new thread is started, it becomes the runnable thread. In this state thread ready to execute the given task.
Running
The thread scheduler has selected then the thread is in running state.
Waiting
In some cases, the thread is waiting state while another thread to perform a task. Once the thread back to runnable state, then executes the waiting thread.
Terminated(Dead)
A runnable thread enters the terminated state when it exits the run() method.
Quickly Find What You Are Looking For
Onlinetpoint is optimized for basic learning, practice and more. Examples are well checked and working examples available on this website but we can't give assurity for 100% correctness of all the content. This site under copyright content belongs to Onlinetpoint. You agree to have read and accepted our terms of use, cookie and privacy policy.