gives C:\nbworkspace\FlowControl\src\TestException.java:6: exception java.io.IOException is never thrown in body of corresponding try statement }catch(IOException e){ 1 error BUILD FAILED (total time: 0 seconds) I was under a impression that the Program#1 should also fail.Can anyone make it out why the Program#1 compiles.
�Catching Throwable, Error (including its subclasses), Exception, and RuntimeException (including its subclasses) always compile. �Catching directly subclasses of Throwable except for Exception and Error will generate a compile time error. �Catching subclasses of Exception except for RuntimeException will generate a compile time error.