当前位置 类层次(JDK) 所有类 (JDK) 所有域和方法 (JDK)

类 java.lang.StringIndexOutOfBoundsException

java.lang.Object
   |
   +----java.lang.Throwable
           |
           +----java.lang.Exception
                   |
                   +----java.lang.RuntimeException
                           |
                           +----java.lang.IndexOutOfBoundsException
                                   |
                                   +----java.lang.StringIndexOutOfBoundsException

public class StringIndexOutOfBoundsException
extends IndexOutOfBoundsException

String 类中的 charAt 方法和 String 中的其它方法抛出以指示一个索引值为负数或大于等于字符串的长度。

来自:
JDK1.0
参见:
charAt

构造子索引

StringIndexOutOfBoundsException()
构造一个没有详细消息的 StringIndexOutOfBoundsException
StringIndexOutOfBoundsException(int)
用参数指定的非法索引创建一新的 StringIndexOutOfBoundsException类。
StringIndexOutOfBoundsException(String)
根据指定的详细信息构造 StringIndexOutOfBoundsException

构造子

StringIndexOutOfBoundsException
 public StringIndexOutOfBoundsException()
构造一个没有详细信息的 StringIndexOutOfBoundsException

StringIndexOutOfBoundsException
 public StringIndexOutOfBoundsException(String s)
根据指定的详细信息构造 StringIndexOutOfBoundsException

参数:
s - 详细信息。
StringIndexOutOfBoundsException
 public StringIndexOutOfBoundsException(int index)
用一个参数指定的非法索引创建一新的 StringIndexOutOfBoundsException类。

参数:
index - 非法下标。

当前位置 类层次(JDK) 所有类(JDK) 所有域和方法(JDK)