4 ms·
I was under the impression that every method had to declare which exceptions are thrown via the `throws` keyword. Is that not the case?
by cpburns2009 9y ago
I was under the impression that every method had to declare which exceptions are thrown via the `throws` keyword. Is that not the case?
- mateo411 9y agoCorrect, all checked exceptions are declared in the method signature.
- theandrewbailey 9y agoOnly for checked exceptions; a RuntimeException does not need to be declared.