Thread.sleep , Object.wait and many other blocking methods throw this exception if interrupted.
Blocking methods that throw InterruptedException clear the thread's
interrupted status before throwing the exception. Code that catches InterruptedException should rethrow the exception, or restore the current thread's
interrupted status, with Thread..interrupt(), before continuing
normally or handling it by throwing another type of exception.
Thread Interruption
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | InterruptedException(String
the detail message. s)Constructs an |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| InterruptedException | back to summary |
|---|---|
| public InterruptedException() Constructs an | |
| InterruptedException | back to summary |
|---|---|
| public InterruptedException(String s) Constructs an
| |