Specific Exceptions

2.6 Recognize situations that will result in any of the following being thrown: ArrayIndexOutOfBoundsException,ClassCastException, IllegalArgumentException, IllegalStateException, NullPointerException, NumberFormatException, AssertionError, ExceptionInInitializerError, StackOverflowError or NoClassDefFoundError. Understand which of these are thrown by the virtual machine and recognize situations in which others should be thrown programatically.

2.6.1 Understand the source and use of the following exceptions:

2.6.1.1 ArrayIndexOutOfBoundsException
Unchecked exception, subclass of RuntimeException.
Caused by a negative array index, or an index past the end of array.

2.6.1.2 ClassCastException
Unchecked exception, subclass of RuntimeException.
A cast was attempted to a subclass that is not a parent of the operand.

2.6.1.3 IllegalArgumentException
Unchecked exception, subclass of RuntimeException.

2.6.1.4 IllegalStateException
2.6.1.5 NullPointerException
2.6.1.6 NumberFormatException
2.6.1.7 AssertionError

2.6.1.8 ExceptionInInitializerError

2.6.1.9 StackOverflowError

2.6.1.10 NoClassDefFoundError
An error thrown if the linker cannot find the definition of the class being loaded. The class was used to compile the code running, but the referenced class can no longer be found.