title: Does Java have something like C#'s ref and out keywords?
body: <p>Something like the following:</p>
  
  <p>ref example:</p>
  
  <pre><code>void changeString(ref String str) {
      str = "def";
  }
  
  void main() {
      String abc = "abc";
      changeString(ref abc);
      System.out.println(abc); //prints "def"
  }
  </code></pre>
  
  <p>out example:</p>
  
  <pre><code>void changeString(out String str) {
      str = "def";
  }
  
  void main() {
      String abc;
      changeString(out abc);
      System.out.println(abc); //prints "def"
  }
  </code></pre>