title: Java string value change in function
body: <p>I have this very awkward question...</p>
  
  <pre><code>void changeString(String str){
      str = "Hello world":
  }
  
  main(){
      String myStr = new String("");
      changeString(myStr);
  }
  </code></pre>
  
  <p>When <code>main</code> returns, the value is still <code>""</code> and not <code>"Hello world"</code>. Why is that?</p>
  
  <p>Also, how do I make it work? Let's say I want my function <code>changeString</code> to change the string it got to "Hello world".</p>