Package java.lang |
![]() Previous |
![]() Java API |
![]() Index |
![]() Next |
public class java.lang.StringIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException { // Constructors public StringIndexOutOfBoundsException(); public StringIndexOutOfBoundsException(int index); public StringIndexOutOfBoundsException(String s) }
Thrown by the charAt method in class class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
public StringIndexOutOfBoundsException()Constructs a StringIndexOutOfBoundsException with no detail message.
public StringIndexOutOfBoundsException(int index)Constructs a new StringIndexOutOfBoundsException class with an argument indicating the illegal index.
Parameter Description index the illegalindex
public StringIndexOutOfBoundsException(String s)Constructs a StringIndexOutOfBoundsException with the specified detail message.
Parameter Description s the detail message