Clean • Professional
A thread in Java goes through several states during its lifecycle. Each state represents what the thread is currently doing. Java officially defines six thread states in the Thread.State enum.

NEW → RUNNABLE → RUNNING → BLOCKED → WAITING → TIMED_WAITING → TERMINATED
1. NEW (Not Started State)
Thread class, but its start() method has not been called yet.Thread t = new Thread(); // NEW
2. RUNNABLE (Ready-to-Run State)
t.start(); // RUNNABLE
3. RUNNING (Actively Executing)
run() method.4. BLOCKED (Waiting for Monitor Lock)
Example:
synchronized(obj) { ... }
5. WAITING (Waiting Indefinitely)
A thread enters the waiting state when it is waiting indefinitely until another thread performs a specific action.
Common causes:
wait()notifyAll()join() without timeoutpark() (LockSupport)The thread remains here until it is explicitly awakened.
Example:
obj.wait();
6. TIMED_WAITING (Wait for a Fixed Time)
This state occurs when a thread is waiting for a specific time duration.
Common causes:
sleep(1000)wait(500)join(2000)parkNanos() / parkUntil()After the time expires, the thread becomes runnable again.
Example:
Thread.sleep(1000);
7. TERMINATED (Dead State)
run() method or exited due to an exception. +---------+
| NEW |
+----+----+
|
start()
|
+---------+
| RUNNABLE|
+----+----+
|
scheduler picks
|
+---------+
| RUNNING |
+----+----+
/ | \\
lock missing|wait() \\sleep()
BLOCKED WAITING TIMED_WAITING
\\ | /
+------|--------+
|
task completed
|
+-------------+
| TERMINATED |
+-------------+
Java provides a simple method to check the current state:
System.out.println(thread.getState());
Â