Класс ArrayIndexOutOfBoundsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
- Все реализуемые интерфейсы:
Serializable
public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException
Выбрасывается для указания, что к массиву обратились с недопустимым индексом. Индекс либо отрицательный, либо больше или равен размеру массива.
- С:
- 1.0
- См. также:
Краткое описание конструкторов
| Конструктор | Описание |
|---|---|
ArrayIndexOutOfBoundsException() |
Создаёт ArrayIndexOutOfBoundsException без сообщения об ошибке. |
ArrayIndexOutOfBoundsException |
Создаёт новый класс ArrayIndexOutOfBoundsException с аргументом, указывающим на недопустимый индекс. |
ArrayIndexOutOfBoundsException |
Создаёт класс ArrayIndexOutOfBoundsException с указанным сообщением об ошибке. |
Краткое описание методов
Методы, объявленные в классе java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Подробное описание конструкторов
ArrayIndexOutOfBoundsException
public ArrayIndexOutOfBoundsException()
Создаёт
ArrayIndexOutOfBoundsException без сообщения об ошибке.ArrayIndexOutOfBoundsException
public ArrayIndexOutOfBoundsException(String s)
Создаёт класс
ArrayIndexOutOfBoundsException с указанным сообщением об ошибке.- Параметры:
-
s- сообщение об ошибке.
ArrayIndexOutOfBoundsException
public ArrayIndexOutOfBoundsException(int index)
Создаёт новый класс
ArrayIndexOutOfBoundsException с аргументом, указывающим на недопустимый индекс. Индекс включён в сообщение об ошибке этого исключения. Точный формат представления сообщения об ошибке не определён.
- Параметры:
-
index- недопустимый индекс.
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html