import java.util.Scanner;
public class Eext {
public static void main(String[] args) {
int[] array = {1,2,3,4,5,6};
//把array[0] 和 array[5] 进行交换 {5,2,3,4,1}
//把array[1] 和 array[4] 进行交换 {5,4,2,3,1}
//把array[2] 和 array[3] 进行交换 {5,4,3,2,1}
//一共要交换三次 = array / 2
//每次交换时,对应的下标 是 array[i] 和 array[array.length -1 -i]
int temp = 0;
int len = array.length;
for (int i = 0; i < len / 2; i++) {
temp = array[len - 1 - i];
array[len - 1 - i] = array[i];
array[i] = temp;
}
for (int i = 0; i < array.length; i++) {
System.out.print(array[i] + "\t");
}
}
}