有没有大神帮忙解读一下,这个for循环怎么走的,先走哪再走哪,尽量详细点,谢
int[] arr = {99,44,77,33,55,88,66};
for(int x = arr.length-1; x >= 0; x--){
for(int y = x-1; y >= 0; y--){
if(arr[y] > arr[x]){
int temp = arr[y];
arr[y] = arr[x];
arr[x] = temp;
}
}
System.out.print(arr[x]+",");
}