APIdia Launch Partner
Top Description Fields Constructors
java.lang

public Class IndexOutOfBoundsException

extends RuntimeException
Class Inheritance
Known Direct Subclasses
java.lang.StringIndexOutOfBoundsException, java.lang.ArrayIndexOutOfBoundsException

Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.

Applications can subclass this class to indicate similar exceptions.

Author
Frank Yellin
Since
1.0

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
IndexOutOfBoundsException()

Constructs an IndexOutOfBoundsException with no detail message.

public
IndexOutOfBoundsException(String
the detail message
s
)

Constructs an IndexOutOfBoundsException with the specified detail message.

public
IndexOutOfBoundsException(int
the illegal index.
index
)

Constructs a new IndexOutOfBoundsException class with an argument indicating the illegal index.

public
IndexOutOfBoundsException(long
the illegal index.
index
)

Constructs a new IndexOutOfBoundsException class with an argument indicating the illegal index.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

Annotations
@Serial

Constructor Detail

IndexOutOfBoundsExceptionback to summary
public IndexOutOfBoundsException()

Constructs an IndexOutOfBoundsException with no detail message.

IndexOutOfBoundsExceptionback to summary
public IndexOutOfBoundsException(String s)

Constructs an IndexOutOfBoundsException with the specified detail message.

Parameters
s:String

the detail message

IndexOutOfBoundsExceptionback to summary
public IndexOutOfBoundsException(int index)

Constructs a new IndexOutOfBoundsException class with an argument indicating the illegal index.

The index is included in this exception's detail message. The exact presentation format of the detail message is unspecified.

Parameters
index:int

the illegal index.

Since
9
IndexOutOfBoundsExceptionback to summary
public IndexOutOfBoundsException(long index)

Constructs a new IndexOutOfBoundsException class with an argument indicating the illegal index.

The index is included in this exception's detail message. The exact presentation format of the detail message is unspecified.

Parameters
index:long

the illegal index.

Since
16