Last Updated: June 6, 2026
A thread isn't always running. From the moment you create a Thread object to the moment its work finishes, the thread passes through a small set of well-defined states, and the JVM tracks exactly which state it's in. This lesson covers the six states defined by Thread.State, what causes each transition, how to inspect a thread's state at runtime with Thread.getState(), and the difference between BLOCKED and WAITING. We use e-commerce worker threads as the running example: a background worker that picks the next order from a queue, grabs a lock on the warehouse inventory, sleeps before retrying when a rate limit hits, and eventually exits when there's nothing left to do.