Passing by reference in Java
<p>How can I pass an array <em>by reference</em> in Java? For instance I need to do some operations on the arrays A and B and populate the array C which should be available to the caller.    </p>

<pre><code>  public boolean Operate(int[] A, int[] B, int[] C)
  {
     //Write into the empty array C by manipulating values of A and B  and it should be accessible to caller
  }
</code></pre>

<p>I <a href="http://stackoverflow.com/questions/1748485/can-you-pass-by-reference-in-java">read</a> that unlike C#, pass by reference is not there in Java. In that case what is the best way to do this.</p>
