Why String class has copy constructor?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/390703/what-is-the-purpose-of-the-expression-new-string-in-java">What is the purpose of the expression “new String(…)” in Java?</a>  </p>
</blockquote>



<p>If immutable classes objects copies would be equal to the originials then why does the <code>String</code> class in Java have a copy constructor? Is it a mistake or there is a reason behind this implementation?
In the Java docs it is specified that:</p>

<pre><code>/**
 * Initializes a newly created {@code String} object so that it represents
 * the same sequence of characters as the argument; in other words, the
 * newly created string is a copy of the argument string. Unless an
 * explicit copy of {@code original} is needed, use of this constructor is
 * unnecessary since Strings are immutable.
 *
 * @param  original
 *         A {@code String}
 */
 public String(String original) {
 ....
 ....}
</code></pre>
