title: Could I change the reference inside one method with this reference as argument in Java?
body: <pre><code>private static void changeString(String s) {
      s = new String("new string");
  }
  
  public static void main(String[] args) {
      String s = new String("old string");
      changeString(s);
      System.out.println(s); // expect "new string"
  }
  </code></pre>
  
  <p>How could I make the output of "new string" happen with s as the <strong>only argument</strong> to method changeString?</p>
  
  <p>thanks.</p>