Multithreading Foundations, Thread State Lifecycle & Synchronization
Master Thread creation (Thread vs Runnable), Thread lifecycle states (NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING, TERMINATED), and synchronized mutex blocks.
Java Thread State Lifecycle Machine
### Thread States in JVM
1. **NEW**: Instantiated but not yet started via `.start()`.
2. **RUNNABLE**: Executing in JVM or eligible for CPU time slice scheduling.
3. **BLOCKED**: Waiting to acquire a `synchronized` monitor lock.
4. **WAITING / TIMED_WAITING**: Suspended waiting for another thread notification or timer.
5. **TERMINATED**: Execution completed.