Packages  This Package  Prev  Next  Index  

§1.44 Class StringIndexOutOfBoundsException

public  class  java.lang.StringIndexOutOfBoundsException
    extends  java.lang.IndexOutOfBoundsException  (I-§1.35)
        // Constructors
    public StringIndexOutOfBoundsException();	§1.44.1
    public StringIndexOutOfBoundsException(int  index);	§1.44.2
    public StringIndexOutOfBoundsException(String  s)	§1.44.3
Thrown by the charAt method (I-§1.16.8) 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.
index - the illegalindex


public StringIndexOutOfBoundsException(String s)
Constructs a StringIndexOutOfBoundsException with the specified detail message.
s - the detail message

Packages  This Package  Prev  Next  Index
Java API Document (HTML generated by dkramer on April 22, 1996)
Copyright © 1996 Sun Microsystems, Inc. All rights reserved
Please send any comments or corrections to