title: Adding a prefix to the String in Java?
body: <p>I know that adding a character in a string should take O(1) time. for eg:-</p>
  
  <pre><code>String S = "abc"
  S = S+'z';
  </code></pre>
  
  <p>What if I want to do vice-versa, concatenating a String into char. Is it possible like this?</p>
  
  <pre><code>S = 'z'+S;
  </code></pre>
  
  <p>If yes, then how much time will it take? Does Java copies whole content of String S{O(n)} or just do adjust pointers in memory {O(1)}?</p>
  
  <p>Thanks!</p>