The state chart diagram given below defines the thread states.
1. Runnable - waiting for its turn to be picked for performing by the thread scheduler based on thread priorities.
2. Running: The processor is actively running the thread code. It performs until it becomes blocked, or voluntarily makes up its turn with that static function Thread.yield(). Because of context switching overhead, yield() could not be used very commonly.
3. Waiting: A thread is in a blocked state while it waits for some external programming such as file I/O to complete.
4. Sleeping: Java threads are forcibly put to suspended (sleep) with this overloaded method: Thread.sleep(milliseconds, nanoseconds), Thread.sleep(milliseconds);
5. Blocked on I/O: Will go to runnable after I/O condition like reading bytes of data etc modifies.
6. Blocked on synchronization: Will go to Runnable when a lock is acquired.
7. Dead: The thread is completed working.