The full picture
🎬 Thread lifecycle states
1 / 7new Thread(task) creates a Thread object — state NEW. No OS thread exists yet; it is just a Java object.
- NEW — the
Threadobject exists, but no OS thread does.start()has not been called. - RUNNABLE — eligible to run. Java folds ready and actually running on a CPU into this single state; the OS scheduler decides which.
- BLOCKED — parked by the JVM because the monitor it needs (
synchronized) is owned by another thread. - WAITING / TIMED_WAITING — parked voluntarily via
wait(),join(),park()(or their timed variants, plussleep(t)). - TERMINATED —
run()returned or threw. A thread can never be restarted;start()twice throwsIllegalThreadStateException.