* Strings are constant; their values cannot be changed after they
* Strings are constant; their values cannot be changed after they
* are created. String buffers support mutable strings.
* are created. String buffers support mutable strings.
* Because String objects are immutable they can be shared. For example:
* Because String objects are immutable they can be shared. For example:
* <p><blockquote><pre>
* <blockquote><pre>
* String str = "abc";
* String str = "abc";
* </pre></blockquote><p>
* </pre></blockquote><p>
* is equivalent to:
* is equivalent to:
* <p><blockquote><pre>
* <blockquote><pre>
* char data[] = {'a', 'b', 'c'};
* char data[] = {'a', 'b', 'c'};
* String str = new String(data);
* String str = new String(data);
* </pre></blockquote><p>
* </pre></blockquote><p>
* Here are some more examples of how strings can be used:
* Here are some more examples of how strings can be used:
* <p><blockquote><pre>
* <blockquote><pre>
* System.out.println("abc");
* System.out.println("abc");
* String cde = "cde";
* String cde = "cde";
* System.out.println("abc" + cde);
* System.out.println("abc" + cde);
...
@@ -786,7 +786,7 @@ public final class String
...
@@ -786,7 +786,7 @@ public final class String
* {@code srcEnd-srcBegin}). The characters are copied into the
* {@code srcEnd-srcBegin}). The characters are copied into the
* subarray of {@code dst} starting at index {@code dstBegin}
* subarray of {@code dst} starting at index {@code dstBegin}
* and ending at index:
* and ending at index:
* <p><blockquote><pre>
* <blockquote><pre>
* dstbegin + (srcEnd-srcBegin) - 1
* dstbegin + (srcEnd-srcBegin) - 1
* </pre></blockquote>
* </pre></blockquote>
*
*
...
@@ -2662,7 +2662,7 @@ public final class String
...
@@ -2662,7 +2662,7 @@ public final class String
* {@code String} may be a different length than the original {@code String}.
* {@code String} may be a different length than the original {@code String}.
* <p>
* <p>
* Examples of locale-sensitive and 1:M case mappings are in the following table.
* Examples of locale-sensitive and 1:M case mappings are in the following table.
* <p>
*
* <table border="1" summary="Examples of locale-sensitive and 1:M case mappings. Shows Language code of locale, lower case, upper case, and description.">
* <table border="1" summary="Examples of locale-sensitive and 1:M case mappings. Shows Language code of locale, lower case, upper case, and description.">