I can't come up with an idea on why the array is printing out the int's in order instead of the order that they're put in the array.
int[] array = {1, 4, 0, 3, 2};
for(int i : array){
System.out.println(array[i]);
}
Is there any explanation of this?
Thanks in advance!