
Life Cycle of Thread 7.15
Once CPU is allocated to a process by the scheduler, the process handles multiple threads
concurrently.
7.12 Life Cycle of Thread
There are five states for thread. They are newBorn, runnable, running, blocked
and dead state. A running thread can be stopped by stop() method. A thread can be
blocked by any one of the following methods:
• sleep()
• suspend() . //deprecated . Cannot be used due to inherent problems.
Instead Java recommends using of IsAlive(0 and join() methods.
• wait() ; A thread is blocked until certain conditions prevail
A newborn thread goes to either runnable state or dead state. With start() method, ...