7.3 Standard Java exceptions
Throwable is a class describes anything that can be thrown
as an exception. There are two types of Throwable.
-
Error
-
Exception
7.3.1 The special case of RuntimeException
If a RuntimeException gets all the way out to main() without
being caught, printStackTrace() is called for that exception as the program
exits.
Case Study: NeverCaught.java
RuntimeException represents a programming error:
-
An error you cant catch.
-
An error that you, as a programmer, should have checked for
in your code.