java.lang
Class IndexOutOfBoundsException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IndexOutOfBoundsException
-
- 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.
-
-
Constructor Summary
Constructors Constructor and 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
fillInStackTrace, getMessage, getStackTrace, 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.
-
-