The states of a Java thread are expressed via the Thread.State enumeration. The possible states of a Java thread are shown in the following diagram:
The different lifecycle states are as follows:
- The NEW state
- The RUNNABLE state
- The BLOCKED state
- The WAITING state
- The TIMED_WAITING state
- The TERMINATED state
Let's learn about all the different states in the following sections.