In the superclass I have:
abstract someMethod() throws someException;
In the subclass I have:
someMethod(){/*do something*/}
Is it ok to do this without a throws someException
declaration? Is it that the throws someException
declaration is there by default without adding it explicitly?
Your implementation doesn’t have to throw any exceptions. However, it can only throw checked exceptions specified in the abstract class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With