This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Type of myred is Fundamental15Sub. So the compiler will look at test method of Fundamental15Sub class which looks like this
So the compiler knows that it doesn't throw any checked exception. So when you enclose the call into a try catch block and catch IOException which is a checked exception, the compiler will see that the IOException is not thrown by the code in the try block. So it will give a compilation error. As punit said, this is true for all checked exceptions exception Exception and Throwable as they have unchecked sub classes RuntimeException etc...