previous
|
start
|
next
Checked and Unchecked Exceptions
Two types of exceptions:
Checked
The compiler checks that you don't ignore them
Due to external circumstances that the programmer cannot prevent
Majority occur when dealing with input and output
For example,
IOException
Unchecked:
Extend the class
RuntimeException
or
Error
They are the programmer's fault
Examples of runtime exceptions:
NumberFormatException IllegalArgumentException NullPointerException
Example of error:
OutOfMemoryError
previous
|
start
|
next