Package java.lang
Class IndexOutOfBoundsException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IndexOutOfBoundsException
-
- All Implemented Interfaces:
Serializable
,Modified
- Direct Known Subclasses:
ArrayIndexOutOfBoundsException
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 newIndexOutOfBoundsException
that includes the current stack trace.IndexOutOfBoundsException(String detailMessage)
Constructs a newIndexOutOfBoundsException
with the current stack trace and the specified detail message.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
getMessage, printStackTrace, printStackTrace, toString
-
-
-
-
Constructor Detail
-
IndexOutOfBoundsException
public IndexOutOfBoundsException()
Constructs a newIndexOutOfBoundsException
that includes the current stack trace.
-
IndexOutOfBoundsException
public IndexOutOfBoundsException(String detailMessage)
Constructs a newIndexOutOfBoundsException
with the current stack trace and the specified detail message.- Parameters:
detailMessage
- the detail message for this exception.
-
-