Exception and Inheritance in JAVA
- by user1759950
Suppose we have this problem
public class Father{
public void method1(){...}
}
public class Child1 extends Father{
public void method1() throws Exception{
super.method1();
...
}
}
Child1 extends Father and override method1 but given implementation Child1.method1 now throws a exception, this wont compile as override method…