Spec-Zone.ru › OpenJDK 24

Класс 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(int index)
Создаёт новый класс ArrayIndexOutOfBoundsException с аргументом, указывающим на недопустимый индекс.
ArrayIndexOutOfBoundsException(String s)
Создаёт класс ArrayIndexOutOfBoundsException с указанным сообщением об ошибке.

Краткое описание методов

Методы, объявленные в классе java.lang.Throwable

addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

Методы, объявленные в классе java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Подробное описание конструкторов

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://download.java.net/java/early_access/jdk24/docs/api/java.base/java/lang/ArrayIndexOutOfBoundsException.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API