title: How does the JVM handle string assignments?
body: <p>Given this code:</p>
  
  <pre><code>String first = "Hello world";
  
  String second = first;
  
  first = "Something else";
  </code></pre>
  
  <p>After the execution, will the variable <code>second</code> point to the same memory instance that the variable <code>first</code> pointed in the first assignment (the same "Hello world") or will it be a completely different memory region (another memory region which also says "Hello world") ?</p>
  
  <p>I want to know if making multiple assignments like in the second line (String other = originalString) causes any performance loss or if it's as fast as assigning any other object.</p>