Package java.lang
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
public class IndexOutOfBoundsException extends RuntimeException
Thrown when a program attempts to access a value in an indexable collection
using a value which is outside of the range of valid indices.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description IndexOutOfBoundsException()Constructs a newIndexOutOfBoundsExceptionthat includes the current stack trace.IndexOutOfBoundsException(String detailMessage)Constructs a newIndexOutOfBoundsExceptionwith the current stack trace and the specified detail message. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
IndexOutOfBoundsException
public IndexOutOfBoundsException()Constructs a newIndexOutOfBoundsExceptionthat includes the current stack trace. -
IndexOutOfBoundsException
Constructs a newIndexOutOfBoundsExceptionwith the current stack trace and the specified detail message.- Parameters:
detailMessage- the detail message for this exception.
-