ArrayIndexOutOfBoundsException
java.lang.Object
|—java.lang.Throwable
|—|—java.lang.Exception
|—|—|—java.lang.RuntimeException
|—|—|—|—java.lang.IndexOutOfBoundsException
|—|—|—|—|—java.lang.ArrayIndexOutOfBoundsException
public class ArrayIndexOutOfBoundsException
extends IndexOutOfBoundsException抛出以指示已使用非法索引访问数组。 索引为负数或大于或等于数组的大小。
构造函数摘要
| 构造函数 | 描述 |
|---|---|
| ArrayIndexOutOfBoundsException() | 构造一个没有详细消息的 ArrayIndexOutOfBoundsException。 |
| ArrayIndexOutOfBoundsException(int index) | 使用指示非法索引的参数构造一个新的 ArrayIndexOutOfBoundsException 类。 |
| ArrayIndexOutOfBoundsException(String s) | 构造具有指定详细消息的 ArrayIndexOutOfBoundsException 类。 |
方法总结
| 从类 java.lang.Object 继承的方法 |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 从类 java.lang.Throwable 继承的方法 |
|---|
| addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
构造函数详细信息
ArrayIndexOutOfBoundsException
public ArrayIndexOutOfBoundsException()
构造一个没有详细消息的 ArrayIndexOutOfBoundsException。
ArrayIndexOutOfBoundsException
public ArrayIndexOutOfBoundsException(int index)
使用指示非法索引的参数构造一个新的 ArrayIndexOutOfBoundsException 类。
参数:
| 参数名称 | 参数描述 |
|---|---|
| index | 非法索引。 |
ArrayIndexOutOfBoundsException
public ArrayIndexOutOfBoundsException(String s)
构造具有指定详细消息的 ArrayIndexOutOfBoundsException 类。
参数:
| 参数名称 | 参数描述 |
|---|---|
| s | 详细信息。 |
文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/156978.html<

