Y
Hacker News
new
|
ask
|
show
|
jobs
by
cpburns2009
3293 days 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?
2 comments
theandrewbailey
3293 days ago
Only for checked exceptions; a RuntimeException does not need to be declared.
link
mateo411
3293 days ago
Correct, all checked exceptions are declared in the method signature.
link