posted 21 years ago
Yes, that's one of the things it means to be a "checked" exception.
It is not legal to try to catch a checked exception that will never be thrown. It is always legal to catch an unchecked exception. It's also legal to catch Exception and Throwable, since those classes have both checked and unchecked subclasses.
(By the way, are you sure that error message comes from the code you are showing us? The code catches IOException but the error message refers to InterruptedException.)
[ October 18, 2002: Message edited by: Ron Newman ]
Ron Newman - SCJP 1.2 (100%, 7 August 2002)