public static void main(String[] args){
//方法一
for(int i = 0; i<arr.length/2;i++ ) {
String temp = arr[i];
arr[i] = arr[arr.length-i-1];
arr[arr.length-i-1] = temp;
}
//方法二
for(int i = 0,j = arr.length-1;i < j;i++,j--) {
String temp1 = arr[i];
arr[i] = arr[j];
arr[j] = temp1;
}
}
01-16
721
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-12
03-15