Program to show - overridden method of subclass cannot declare/throw broader (superclass of) checked exception

If superclass method throws/declare checked/compileTime exception - overridden method of subclass cannot declare/throw broader (superclass of) checked exception

Any attempt to throw broader (superclass of) checked exception in overridden method of subclass will cause compilation error.
Exception is superclass of IOException.



/** Copyright (c), AnkitMittal JavaMadeSoEasy.com */
Must read for you :

No comments:

Post a Comment