title: What is the performance cost of assigning a single string value using +'s
body: <p>I have often wondered this, is there a performance cost of splitting a string over multiple lines to increase readability when initially assigning a value to a string. I know that strings are immutable and therefore a new string needs to be created every time. Also, the performance cost is actually irrelevant thanks to today's really fast hardware (unless you are in some diabolical loop). So for example:</p>
  
  <pre><code>String newString = "This is a really long long long long long" +
      " long long long long long long long long long long long long " +
      " long long long long long long long long long string for example.";
  </code></pre>
  
  <p>How does the JVM or .Net's compiler and other optimizations handle this. Will it create a single string? Or will it create 1 string then a new concatenating the value and then another one concatenating the values again?</p>
  
  <p>This is for my own curiosity.</p>