I am confused .Class Inner throws Exception,but InnerA throws Error,InnerB throws RuntimeException.I remembered that the overridden method can't throw Exception that never throw,but according to this piece of code,it seems right??Why??
An overriding method may only throw a subset (possibly empty) of the set of checked exceptions declared to be thrown by the overridden method. RuntimeException and its subclasses, and Error and its subclasses are not checked exceptions so the above rule is not applicable. -Barry