previous |
start |
next
Checked Exceptions
- Compiler checks that you are aware of the exception
- Generally used for errors that can happen even in correct
programs
- IOException and its sublcasses are checked
exceptions
- NullPointerException,
ArrayIndexOutOfBoundsException , . . . are
unchecked--they are your fault :-)
- Virtual machine errors (e.g. OutOfMemoryError) are
unchecked
- Classification not perfect. For example,
Integer.parseInt throws unchecked
NumberFormatException
- Checked exceptions are subclasses of Exception that
are not subclasses of RuntimeException
previous |
start |
next