public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException用非法索引访问数组时抛出的异常。如果索引为负或大于等于数组大小,则该索引为非法索引。
构造方法:public ArrayIndexOutOfBoundsException()
-
构造不带详细消息的
ArrayIndexOutOfBoundsException
。
public ArrayIndexOutOfBoundsException(int index)
-
构造具有指示非法索引的参数的新
ArrayIndexOutOfBoundsException
类。-
参数:
-
index
- 非法索引。
-
public ArrayIndexOutOfBoundsException(String s)
-
构造具有指定详细消息的
ArrayIndexOutOfBoundsException
类。-
参数:
-
s
- 详细消息。
-