Question: ```
public class Venus1
{
    public static void main(String args[])
    {
        int[]x={1,2,3};
        int[]y={4,5,6};
        new Venus1().go(x);
    }
    void go(int... z)
    {
        for(int i:z)
            System.out.println(z[0]);
    }
}

```

The output is `111`

How do I change the code so it returns `123`?

Answer: 
Change 

```
System.out.println(z[0]);

```

to

```
System.out.println(i);

```

When you iterate over the array using the enhanced for loop, the variable of the loop (`i` in your code) is assigned the current element of the array in each iteration.
Change 

```
System.out.println(z[0]);

```

to

```
System.out.println(z[i]);

```

Basically you need to print the `ith` indices instead of `z[0]`