Common exceptions array

After an exception would lead to the end of the program

    Array index bounds exception: ArrayIndexOutOfBoundsException

        The reason: Access the index does not exist

        Change: Do not access the index does not exist

 

    Array null pointer exception: NullPointerException

        The reason: The array type variable does not point to any array

        Change: Do not let the array type variable assignment is null

Guess you like

Origin www.cnblogs.com/libinhong/p/10988766.html