Класс 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 с указанным подробным сообщением. |
Краткое описание методов
Методы, объявленные в классе 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, 2025, 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/25/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html