Exception: java.lang.StringIndexOutOfBoundsException

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.
Authors:
@author unascribed
See:
@see String.charAt(int)
Since:
@since JDK1.0

Inheritance

Superclass tree: Implements:

Methods

  • StringIndexOutOfBoundsExceptiontop

    public StringIndexOutOfBoundsException()
    Constructs a StringIndexOutOfBoundsException with no detail message.
    Since:
    @since JDK1.0.
    Google Code Search
    Stack Overflow
  • StringIndexOutOfBoundsExceptiontop

    public StringIndexOutOfBoundsException(int index)
    Constructs a new StringIndexOutOfBoundsException class with an argument indicating the illegal index.
    Parameters:
    @param index the illegal index.
    Google Code Search
    Stack Overflow
  • StringIndexOutOfBoundsExceptiontop

    public StringIndexOutOfBoundsException(String s)
    Constructs a StringIndexOutOfBoundsException with the specified detail message.
    Parameters:
    @param s the detail message.
    Google Code Search
    Stack Overflow