Exercise : reference mystery practice-it

What four lines of output are produced by the following program?

public class ReferenceMystery {
    public static void main(String[] args) {
        int y = 1;
        int x = 3;
        int[] a = new int[4];
        mystery(a, y, x);                                             // 2 3 [0, 0, 17, 0][^0-9,]+
        System.out.println(x + " " + y + " " + Arrays.toString(a));   // 3 1 [0, 0, 17, 0][^0-9,]+
        x = y - 1;
        mystery(a, y, x);                                             // 1 0 [17, 0, 17, 0][^0-9,]+
        System.out.println(x + " " + y + " " + Arrays.toString(a));   // 0 1 [17, 0, 17, 0][^0-9,]+
    }

    public static void mystery(int[] a, int x, int y) {
        if (x < y) {
            x++;
            a[x] = 17;
        } else {
            a[y] = 17;
        }
        System.out.println(x + " " + y + " " + Arrays.toString(a));
    }
}