Q41: What are the states in the Java Thread Lifecycle?

  1. NEW: Thread instantiated, start() not yet called.
  2. RUNNABLE: Executing or eligible for execution in OS scheduler pool.
  3. BLOCKED: Waiting to acquire a monitor lock (synchronized block).
  4. WAITING: Waiting indefinitely for another thread action (Object.wait(), Thread.join()).
  5. TIMED_WAITING: Waiting for a specified time duration (Thread.sleep(ms), wait(ms)).
  6. TERMINATED: Execution completed.
Java Thread State Transitions
Key Takeaways
  • BLOCKED = Waiting to acquire a monitor lock. WAITING = Waiting for thread signal notification.
Knowledge Check

Which state does a thread enter when waiting to acquire a synchronized block lock held by another thread?