public class java.lang
StringIndexOutOfBoundsException


Show All Login
Java SE 6
  
Extends: Throwable > Exception > RuntimeException > IndexOutOfBoundsException
Details
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.
version1.23, 11/17/05
sinceJDK1.0
See also charAt(int)

Constructors
public StringIndexOutOfBoundsException() Details
Constructs a StringIndexOutOfBoundsException with no detail message.
sinceJDK1.0.
public StringIndexOutOfBoundsException(String s) Details
Constructs a StringIndexOutOfBoundsException with the specified detail message.
sthe detail message.
public StringIndexOutOfBoundsException(int index) Details
Constructs a new StringIndexOutOfBoundsException class with an argument indicating the illegal index.
indexthe illegal index.