- The answer to the above Question is option 2. but According to my understanding a new overrided method can only specify all or none or a subset of the exception classes specified in the throws clause of the overridden method in the superclass.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Joined: Dec 26, 2005
thanks ... this is a good doc. I think i got the point. this is my understanding...Please do let me know if i am wrong. "The Overridden method in subclass is throwing unchecked exp... whereas overiding method restriction on exceptions is only for checked exceptions.
I mean - a overridden method in a subclass can throw subtypes of checked exception only but there is no restriction on unchecked exception. Overriding method in subclass is free to declare any new unchecked exception bt not checked exception".
please let me know...if i am close to correct explanation.