title: Java reflection to change parameter?
body: <p>I'm writing a method in Java that I want to simulate references.. Since java doesn't have the out keyword like in C# and doesn't have References/Pointers like in C++, I want to know if I can use reflection to simulate it.</p>
  
  <p>An example would be:</p>
  
  <pre><code>public static boolean ChangeValue(Object Input, Object Output) {
      //Use some reflection here to change the value of Output?
      return true;
  }
  </code></pre>
  
  <p>then in main:</p>
  
  <pre><code>public static void main(String[] args) {
      int I = 0;
      ChangeValue(I, I);
      System.out.println(I);
  }
  </code></pre>
  
  <p>So.. Can I use reflection to change the value of any parameter passed to my ChangeValue method? I do not want to return Composite objects..</p>