Exception: java.lang.StringIndexOutOfBoundsException
- public exception StringIndexOutOfBoundsException
- extends IndexOutOfBoundsException
Thrown by
String methods to indicate that an index
is either negative or greater than the size of the string. For
some methods such as the charAt method, this exception also is
thrown when the index is equal to the size of the string.Inheritance
Superclass tree:- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- java.lang.IndexOutOfBoundsException
- java.lang.StringIndexOutOfBoundsException
Methods
-
StringIndexOutOfBoundsExceptiontop
public StringIndexOutOfBoundsException()Constructs aStringIndexOutOfBoundsExceptionwith no detail message. -
StringIndexOutOfBoundsExceptiontop
public StringIndexOutOfBoundsException(int index)Constructs a newStringIndexOutOfBoundsExceptionclass with an argument indicating the illegal index. -
StringIndexOutOfBoundsExceptiontop
public StringIndexOutOfBoundsException(String s)Constructs aStringIndexOutOfBoundsExceptionwith the specified detail message.
