title: Is Java String immutable?
body: <p>I don't understand this code, why my string <code>c</code> don't changing in <code>main</code> method but changing in <code>changeString</code>. Can you explain me?   </p>
  
  <pre><code>class MainClass {
      public static void main(String[] args) {
          String c = "lalala";
          changeString(c);
          System.out.println("str in main = "+c);
      }
  
      public static void changeString(String str) {
          str = str + "CHANGE!!!";
          System.out.println("str in changeString = "+str);
      }
  
  }
  </code></pre>
  
  <p>Result: </p>
  
  <pre><code>str in changeString = lalalaCHANGE!!!
  str in main = lalala
  </code></pre>