Tell about exception handling method overriding?
Exception handling method overriding have to follow by some rules:
- If the parent class method does not declare any exception, the child class override that method can’t not declared checked exception. It only can declare uncheked exception.
- If the parent class method declared an exception, the child class override from that can do some following action like:
+ Can declared no exception
+ Can declared same exception
+ Can declared narrower exception than parent class method