Thrown when a thread is waiting, sleeping, or otherwise occupied and another thread interrupts it. Always restore the interrupt flag: Thread.currentThread().interrupt().
InterruptedException
java Thrown when a thread is waiting, sleeping, or otherwise occupied and another thread interrupts it. Always restore the interrupt flag: Thread.currentThread().interrupt().