+--------+
| Object |
+--------+
|
|
+-----------+
| Throwable |
+-----------+
/ \
/ \
+-------+ +-----------+
| Error | | Exception |
+-------+ +-----------+
/ | \ / | \
\________/ \______/ \
+------------------+
unchecked checked | RuntimeException |
+------------------+
/ | | \
\_________________/
unchecked
- most of the built-in exceptions (e.g., NullPointerException, IndexOutOfBoundsException) are unchecked.
- IOExceptions (e.g., FileNotFoundException) are checked
- user-defined exceptions should usually be checked, so they should be subclasses of Exception.