Class InterruptedIOException in Java

Class InterruptedIOException in Java InterruptedIOException is another popular built-in exception classes in java and is thrown…