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.
when you are creating object for class B
At first the constructor of class B is executed in which it executes super(); As a result it executes the super class constructor that mean class A's constructor in which it is throwing filenotfoundexception
so class B's constructor should handle or declare that exception..
here it is throwing that exception to the method from which you called class B's constructor..
but main method is not declaring as well as not handling that filenotfoundexception that why the compiler gives you error....