What is the difference between checked and unchecked exceptions in java? Why do we throw using 'throws' exception instead of catching them?
Tell me more
×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.
put on hold as off-topic by Kilian Foth, Philipp, ChrisF♦ Oct 28 at 11:37
- This question does not appear to be about software development within the scope defined in the help center.
A checked exception requires that you add a
This will not work:
An unchecked exception does not need this.
And, just for completeness, the way to determine unchecked from checked exceptions is that unchecked exceptions all descend from | |||||
|