Checked exceptions must be handled at compile time. Runtime exceptions do not need to be. Errors often cannot be.
Throwable
class hierarchyjava.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Error
|
+----java.lang.Exception
|
+----java.io.IOException
|
+----java.lang.RuntimeException
|
+----java.lang.ArithmeticException
|
+----java.lang.ArrayIndexOutOfBoundsException
|
+----java.lang.IllegalArgumentException
|
+----java.lang.NumberFormatException
Almost all the code is in the java.lang.Throwable
class. Almost all of its subclasses only provide new constructors
that change the message of the exception.