public class StringIndexOutOfBoundsException extends IndexOutOfBoundsException
String
方法表明,指数为负或者大于字符串的长度。对于charAt这样的方法,这种例外也当指数等于字符串的大小抛出。
String.charAt(int)
,
Serialized Form
Constructor and Description |
---|
StringIndexOutOfBoundsException()
创建一个不含详细信息
StringIndexOutOfBoundsException 。
|
StringIndexOutOfBoundsException(int index)
提出了一种新的论据说明非法
StringIndexOutOfBoundsException 类指标。
|
StringIndexOutOfBoundsException(String s)
创建一个指定详细信息的
StringIndexOutOfBoundsException 。
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public StringIndexOutOfBoundsException()
StringIndexOutOfBoundsException
。
public StringIndexOutOfBoundsException(String s)
StringIndexOutOfBoundsException
。
s
-详细信息。
public StringIndexOutOfBoundsException(int index)
StringIndexOutOfBoundsException
类指标。
index
-非法指数。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.