When a thread terminates its processing, it enters the dead state.
When a thread in Java terminates its processing, it enters the “Terminated” state. The thread goes through various states during its lifecycle, including:
- New: The thread is in this state when it has been instantiated but not yet started.
- Runnable: The thread is in this state when the
start()
method has been called, and the thread is ready to run. However, it may not be currently executing due to the operating system’s scheduling. - Blocked: The thread is in this state when it is waiting for a monitor lock to enter a synchronized block or method.
- Waiting: The thread is in this state when it is waiting indefinitely for another thread to perform a particular action.
- Timed Waiting: The thread is in this state when it is waiting for another thread to perform a particular action for a specified amount of time.
- Terminated (or Dead): The thread is in this state when it has completed execution or has been explicitly stopped by calling its
stop()
method. Once a thread is in the Terminated state, it cannot be restarted.
So, the correct answer to your question is the “Terminated” state.