The thread life cycle in java consists of 6 states.Some good links for detail examples of thread life cycle in java : https://www.baeldung.com/java-thread-...
thread life cycle in java is explained clearly in this official oracle java 8 documentation
https://docs.oracle.com/javase/8/docs...
thread life cycle in java consists of following states:
NEW : A thread that has not yet started is in this state.
RUNNABLE : A thread executing in the Java virtual machine is in this state.
BLOCKED : A thread that is blocked waiting for a monitor lock is in this state.
WAITING : A thread that is waiting indefinitely for another thread to perform a particular action is in this state.
TIMED_WAITING : A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state.
TERMINATED : A thread that has exited is in this state.
Note: After waiting for specific time in blocked state if thread gets the object lock again then it goes again to runnable state but it is not guaranteed that it will get scheduled by thread scheduler immediately. It might happen that the thread in runnable state may have to wait in runnable pool until processor is available and thread scheduler schedules it
watch my java threads tutorial playlist below:
• Java Threads Tutorial : What is a Thr...
Instagram link : / thecscoach