I was going through SCJP 6 book by Kathe sierra and came across this explanations of throwing exceptions in overridden method. I quite didn\'t get it. Can any one explain it
Rule of handling check and unchecked exceptions on overridden methods
-When parent-class method declares no exception, then child-class overriding- method can declare,
1. No exception or
2. Any number of unchecked exception
3. but strictly no checked exception
-When parent-class method declares unchecked exception, then child-class overriding-method can declare,
1. No exception or
2. Any number of unchecked exception
3. but strictly no checked exception
-When parent-class method declares checked exception, then child-class overriding-method can declare,
1. No exception or
2. Same checked exception or
3. Sub-type of checked exception or
4. any number of unchecked exception
All above conclusion hold true, even if combination of both checked & unchecked exception is declared in parent-class’ method
Ref