Program to show - overridden method of subclass cannot declare/throw any checked exception

If superclass method throws/declare unchecked/RuntimeException - overridden method of subclass cannot declare/throw any checked exception


Any attempt to throw checked exception in overridden method of subclass will cause compilation error.



/** Copyright (c), AnkitMittal JavaMadeSoEasy.com */

No comments:

Post a Comment