描述
The java.lang.String.subSequence() method returns a new character sequence that is a subsequence of this sequence.
声明
Following is the declaration for java.lang.String.subSequence() method
public CharSequence subSequence(int beginIndex, int endIndex)
参数
beginIndex -- This is the value of begin index, inclusive.
endIndex -- This is the value of the end index, exclusive.
返回值
This method returns the specified subsequence.
异常
IndexOutOfBoundsException -- if beginIndex or endIndex are negative, if endIndex is greater than length(), or if beginIndex is greater than startIndex.