Thread States



A thread can be in one of the following states:
NEW
A thread that has not yet started is in this state. It is just created 
The .start() method is yet not called on this thread.
   
RUNNABLE
When a thread object call .start() method then that thread becomes runnable. But yet CPU is not available for it.
   
RUNNING
A thread executing in the Java virtual machine is in this state. A thread which is executing its task inside a run method is in RUNNING state.
   
BLOCKED
A thread that is blocked waiting for a monitor lock is in this state.
Any thread which is attempt to enter the locked method then it becomes BLOCKED thread.
A waiting thread comes to BLOCKED state.
When RUNNING thread released the occupied lock then the any BOCKED thread will get the chance to run.
   
WAITING
A thread that is waiting indefinitely for another thread to perform a particular action is in this state.
A waiting thread come back to Runnable state once it is getting notified.
When thread calls wait then it releases the current object lock (it keeps all locks from other objects) and it goes to WAITING state.
Until another thread notify this thread. It will be in waiting state. When other thread call notify() or notifyAll() then the waiting thread will be in the BlOCKED state. WAITING never goes directly to RUNNABLE.  A waiting thread release the occupied lock.   
   
TIMED_WAITING
A thread which is waiting for some specified amount of time is in this state.
Time Waiting thread does not release its lock.
   
TERMINATED
A thread that has exited and completed its run() method is in terminated state.

At a time a Thread can be in one state only.