In answering the previous post on overriding, I got into this doubt. I am not able to reason it . Cud somebody help?
An Overriding method cannot throw any more Checked Exception than the overriden method.
My Question is WHY
I was trying to reason saying that when the object reference of the parent class finds a child object and if there is a overriden method in it which throws more checked Exceptions ...
... then I am lost!!!
I say.. so what ? It is after all an extended functionality ... I am not cutting off any of the parent's functionality .... !!
Where am I going wrong ?
An Overriding method cannot throw any more Checked Exception than the overriden method.
My Question is WHY
I was trying to reason saying that when the object reference of the parent class finds a child object and if there is a overriden method in it which throws more checked Exceptions ...
... then I am lost!!!
I say.. so what ? It is after all an extended functionality ... I am not cutting off any of the parent's functionality .... !!
Where am I going wrong ?