posted 11 years ago
hi, i want to ask that what did broader exception means , in context of that overriding methods cannot declare broader exceptions than overriden/original methods.
i want to know about what does broader exception means here?
broader exceptions means exception of parent class eg:
class subException extends Exception{}
class subsubException extends subException{}
class c{ void mehtod() throw subException{}
}
class b extends c{void method() throw Exception{}}
actually i was preparing for scjp6 and i encountered this question? itz so confusing that what exception can method() of class b can throw legally ?
what are broader exceptions ?