passing value to function
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7998209/pass-by-reference-in-java">pass by reference in java</a>  </p>
</blockquote>



<p>I am new to java. I tried to search a lot for my query but could not find. Please help me if you know. I have a function:</p>

<pre><code>boolean func(int a, int b, myclass obj1, myclass2 obj2)
{
    ...
}

void caller() {
    int a = 0, b=0;
    myclass obj1 = null;
    myclass1 obj2 = null;
    func(a,b,obj1,obj2);
    if (a == 5 &amp;&amp; b ==2)
    {
        ...
    }
}
</code></pre>

<p>what should i do such that all passed variables have the value in caller function which was given by function func?</p>
