Try this and see if it helps. The --> should be read as the same as.
int arr[] = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
for (int n = 0; arr[n] < arr.length; n++) {
System.out.println("n = " +n + ", arr[" + n + "] = " + arr[n] + ", arr[arr[" + n +"]] --> arr[" + arr[n] + "] = " +arr[arr[n]]);
}
prints
n = 0, arr[0] = 1, arr[arr[0]] --> arr[1] = 2
n = 1, arr[1] = 2, arr[arr[1]] --> arr[2] = 3
n = 2, arr[2] = 3, arr[arr[2]] --> arr[3] = 4
n = 3, arr[3] = 4, arr[arr[3]] --> arr[4] = 5
n = 4, arr[4] = 5, arr[arr[4]] --> arr[5] = 6
n = 5, arr[5] = 6, arr[arr[5]] --> arr[6] = 7
n = 6, arr[6] = 7, arr[arr[6]] --> arr[7] = 8
n = 7, arr[7] = 8, arr[arr[7]] --> arr[8] = 9
arr[n]tovor something and see what is going on.