Class IndexOutOfBoundsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IndexOutOfBoundsException
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- ArrayIndexOutOfBoundsException,- StringIndexOutOfBoundsException
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.
- Since:
- 1.0
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionConstructs anIndexOutOfBoundsExceptionwith no detail message.IndexOutOfBoundsException(int index) Constructs a newIndexOutOfBoundsExceptionclass with an argument indicating the illegal index.IndexOutOfBoundsException(long index) Constructs a newIndexOutOfBoundsExceptionclass with an argument indicating the illegal index.Constructs anIndexOutOfBoundsExceptionwith the specified detail message.
- 
Method SummaryMethods declared in class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
IndexOutOfBoundsExceptionpublic IndexOutOfBoundsException()Constructs anIndexOutOfBoundsExceptionwith no detail message.
- 
IndexOutOfBoundsExceptionConstructs anIndexOutOfBoundsExceptionwith the specified detail message.- Parameters:
- s- the detail message
 
- 
IndexOutOfBoundsExceptionpublic IndexOutOfBoundsException(int index) Constructs a newIndexOutOfBoundsExceptionclass 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- the illegal index.
- Since:
- 9
 
- 
IndexOutOfBoundsExceptionpublic IndexOutOfBoundsException(long index) Constructs a newIndexOutOfBoundsExceptionclass 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- the illegal index.
- Since:
- 16
 
 
-