Save This Page
Home » openjdk-7 » java » lang » [javadoc | source]
java.lang
public class: StringIndexOutOfBoundsException [javadoc | source]
java.lang.Object
   java.lang.Throwable
      java.lang.Exception
         java.lang.RuntimeException
            java.lang.IndexOutOfBoundsException
               java.lang.StringIndexOutOfBoundsException

All Implemented Interfaces:
    Serializable

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.
Fields inherited from java.lang.RuntimeException:
serialVersionUID
Fields inherited from java.lang.Exception:
serialVersionUID
Constructor:
 public StringIndexOutOfBoundsException() 
 public StringIndexOutOfBoundsException(String s) 
    Constructs a StringIndexOutOfBoundsException with the specified detail message.
    Parameters:
    s - the detail message.
 public StringIndexOutOfBoundsException(int index) 
Methods from java.lang.Throwable:
fillInStackTrace,   getCause,   getLocalizedMessage,   getMessage,   getStackTrace,   initCause,   printStackTrace,   printStackTrace,   printStackTrace,   setStackTrace,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait