import java.util.Arrays;
public class Main {
public static void main(String[] args) {
//一个int类型的数组
int[] shuZu = {12, 13, 14, 15, 16,1};
for (int kaiShi = 0, zuiHou = shuZu.length - 1; kaiShi <= zuiHou; kaiShi++, zuiHou--) {
int cunFang = shuZu[kaiShi];
shuZu[kaiShi] = shuZu[zuiHou];
shuZu[zuiHou] = cunFang;
}
System.out.println("数组反转之后" + Arrays.toString(shuZu));
}
}
个人用来记录,变量命名请不要介意