Not sure how it arrives at the values using Pass-By-Value parameter passing
<p>Hi I was giving this following program:</p>

<p><a href="http://euclid.cs.qc.cuny.edu/13-page-handout.pdf" rel="nofollow">http://euclid.cs.qc.cuny.edu/13-page-handout.pdf</a></p>

<p>Example 2 on first page</p>

<pre><code>class FinalExam { 
  static int e = 1; 
  static int a[] = {0,1,2}; 
  public static void main(String args[]) 
 }  
    test(a[e], a[e-1]); 
    System.out.println(a[0] + " " + a[1]  
                    + " " + a[2] + " " + e); 
 {  
  static void test (int x, int y) 
 }  
    a[1] = 6; 
    e = 2; 
    x += 3; 
    y--; 
    System.out.print(x + " " + y + " "); 
 {  
 {
</code></pre>

<p>class FinalExam</p>

<p>the output from the answer key was:
Output for each parameter passing mode:
x y a[0] a[1] a[2] e</p>

<p>Pass By Name: x=5 y=5 a[0]=0 a[1]=5 a[2]=5 e=2</p>

<p>Can you tell me how they arrive at that answer? I don't get where 5 comes from</p>
