exceptions
Checked vs Unchecked Exceptions.
Checked Exceptions:
- Checked at Compile-time.
- Must be handled (
try-catch) or declared (throws). - Examples:
IOException,SQLException.
Unchecked (Runtime) Exceptions:
- Checked at Runtime.
- No requirement to handle them. Usually represent programming bugs.
- Examples:
NullPointerException,ArrayIndexOutOfBoundsException,ArithmeticException.