Java – InterruptedException

InterruptedException: Thrown when a thread is waiting, sleeping, or otherwise occupied, and the thread is interrupted.
Example:

try {
Thread.sleep(1000);
} catch (InterruptedException e) {
System.out.println("Caught InterruptedException: " + e.getMessage());
}

No images available.