src/share/classes/java/lang/String.java

Print this page
rev 5574 : 7170938: (str) incorrect wording in doc for String.subSequence
Reviewed-by: xxx
Contributed-by: Joe Bowbeer <joe.bowbeer@gmail.com>

*** 1919,1939 **** * behaves in exactly the same way as the invocation * * <blockquote><pre> * str.substring(begin,&nbsp;end)</pre></blockquote> * ! * This method is defined so that the <tt>String</tt> class can implement * the {@link CharSequence} interface. </p> * * @param beginIndex the begin index, inclusive. * @param endIndex the end index, exclusive. * @return the specified subsequence. * * @throws IndexOutOfBoundsException ! * if <tt>beginIndex</tt> or <tt>endIndex</tt> are negative, ! * if <tt>endIndex</tt> is greater than <tt>length()</tt>, ! * or if <tt>beginIndex</tt> is greater than <tt>startIndex</tt> * * @since 1.4 * @spec JSR-51 */ public CharSequence subSequence(int beginIndex, int endIndex) { --- 1919,1939 ---- * behaves in exactly the same way as the invocation * * <blockquote><pre> * str.substring(begin,&nbsp;end)</pre></blockquote> * ! * This method is defined so that the {@code String} class can implement * the {@link CharSequence} interface. </p> * * @param beginIndex the begin index, inclusive. * @param endIndex the end index, exclusive. * @return the specified subsequence. * * @throws IndexOutOfBoundsException ! * if {@code beginIndex} or {@code endIndex} is negative, ! * if {@code endIndex} is greater than {@code length()}, ! * or if {@code beginIndex} is greater than {@code endIndex} * * @since 1.4 * @spec JSR-51 */ public CharSequence subSequence(int beginIndex, int endIndex) {