-
Bug
-
Resolution: Fixed
-
P4
-
6-pool
-
b05
-
generic
-
generic
-
Verified
The explanation of substring(int beginIndex, int endIndex) seems to be confusing.
There is a typo in the description of String substring(int beginIndex, int endIndex).
URL: http://download.oracle.com/javase/tutorial/java/data/manipstrings.html
Description:
Returns a new string that is a substring of this string. The first integer argument specifies the index of the first character. The second integer argument is the index of the last character + 1.
- It should be "last character - 1".
- Or in a form more easy to understand (from your 1.4.2 docs):
Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.
There is a typo in the description of String substring(int beginIndex, int endIndex).
URL: http://download.oracle.com/javase/tutorial/java/data/manipstrings.html
Description:
Returns a new string that is a substring of this string. The first integer argument specifies the index of the first character. The second integer argument is the index of the last character + 1.
- It should be "last character - 1".
- Or in a form more easy to understand (from your 1.4.2 docs):
Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.