Runtime exceptions

NullPointerException

Thrown when an application attempts to use null in a case where an object is required. These include:

  • Accessing or modifying the field of a null object.

  • Taking the length of null as if it were an array.

  • Accessing or modifying the slots of null as if it were an array.


IndexOutOfBoundsException

Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.


Last updated