85 * {@code toString}, defined by {@code Object} and |
85 * {@code toString}, defined by {@code Object} and |
86 * inherited by all classes in Java. For additional information on |
86 * inherited by all classes in Java. For additional information on |
87 * string concatenation and conversion, see Gosling, Joy, and Steele, |
87 * string concatenation and conversion, see Gosling, Joy, and Steele, |
88 * <i>The Java Language Specification</i>. |
88 * <i>The Java Language Specification</i>. |
89 * |
89 * |
90 * <p> Unless otherwise noted, passing a <tt>null</tt> argument to a constructor |
90 * <p> Unless otherwise noted, passing a {@code null} argument to a constructor |
91 * or method in this class will cause a {@link NullPointerException} to be |
91 * or method in this class will cause a {@link NullPointerException} to be |
92 * thrown. |
92 * thrown. |
93 * |
93 * |
94 * <p>A {@code String} represents a string in the UTF-16 format |
94 * <p>A {@code String} represents a string in the UTF-16 format |
95 * in which <em>supplementary characters</em> are represented by <em>surrogate |
95 * in which <em>supplementary characters</em> are represented by <em>surrogate |
1133 * different, then either they have different characters at some index |
1133 * different, then either they have different characters at some index |
1134 * that is a valid index for both strings, or their lengths are different, |
1134 * that is a valid index for both strings, or their lengths are different, |
1135 * or both. If they have different characters at one or more index |
1135 * or both. If they have different characters at one or more index |
1136 * positions, let <i>k</i> be the smallest such index; then the string |
1136 * positions, let <i>k</i> be the smallest such index; then the string |
1137 * whose character at position <i>k</i> has the smaller value, as |
1137 * whose character at position <i>k</i> has the smaller value, as |
1138 * determined by using the < operator, lexicographically precedes the |
1138 * determined by using the {@code <} operator, lexicographically precedes the |
1139 * other string. In this case, {@code compareTo} returns the |
1139 * other string. In this case, {@code compareTo} returns the |
1140 * difference of the two character values at position {@code k} in |
1140 * difference of the two character values at position {@code k} in |
1141 * the two string -- that is, the value: |
1141 * the two string -- that is, the value: |
1142 * <blockquote><pre> |
1142 * <blockquote><pre> |
1143 * this.charAt(k)-anotherString.charAt(k) |
1143 * this.charAt(k)-anotherString.charAt(k) |