java.lang
Class StringIndexOutOfBoundsException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IndexOutOfBoundsException
-
- java.lang.StringIndexOutOfBoundsException
-
public class StringIndexOutOfBoundsException extends IndexOutOfBoundsException
Thrown when the a string is indexed with a value less than zero, or greater than or equal to the size of the array.
-
-
Constructor Summary
Constructors Constructor and Description StringIndexOutOfBoundsException()
Constructs a newStringIndexOutOfBoundsException
that includes the current stack trace.StringIndexOutOfBoundsException(int index)
Constructs a newStringIndexOutOfBoundsException
with the current stack trace and a detail message that is based on the specified invalidindex
.StringIndexOutOfBoundsException(String detailMessage)
Constructs a newStringIndexOutOfBoundsException
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
-
StringIndexOutOfBoundsException
public StringIndexOutOfBoundsException()
Constructs a newStringIndexOutOfBoundsException
that includes the current stack trace.
-
StringIndexOutOfBoundsException
public StringIndexOutOfBoundsException(int index)
Constructs a newStringIndexOutOfBoundsException
with the current stack trace and a detail message that is based on the specified invalidindex
.- Parameters:
index
- the index which is out of bounds.
-
StringIndexOutOfBoundsException
public StringIndexOutOfBoundsException(String detailMessage)
Constructs a newStringIndexOutOfBoundsException
with the current stack trace and the specified detail message.- Parameters:
detailMessage
- the detail message for this exception.
-
-