in the first class your declared a method, which throws an Exception. then you created a class that IS-A sub-class of the first class. then in the sub-class, you declared an overloaded version of the method declared in the first class. this overloaded version does not throw any exception(As per your Calculation)
and you declared the main method as throwing an Exception ... Now what happens ...?
At compile time, the compiler sees that an object is being referenced using a super type reference variable... and a method is being invoked on it.
so it checks if the method is present in both the classes. which is true. and it comes to the conclusion that there is an overloaded version in the subclass. now according to Inheritance, every class that extends from another class, inherits every variable,property that is supposed to be possessed by the super class... so the subclass unknowingly inherits the Exceptions declared by the superclass. so.when a class inherits exceptions,it is supposed to throw them...so we have to
1) either declare that the method (method of subclass)throws Exception. OR 2) Enclose the invocation of the method in try/catch block. OR 3) declare that the method throws an Exception
... Now did you understand why we declared that main throws an Exception.