public class Test15 {
public static void main(String[] args) {
int[] a = {1,3,5,4};
int temp = 0;
for(int i = a.length - 1; i > a.length / 2; i--) {
temp = a[i];
a[i] = a[a.length - 1 - i];
a[a.length - 1 - i] = temp;
}
for(int i = 0; i < a.length; i++) {
System.out.println(a[i]);
}
}
}
转载请注明原文地址:https://ipadbbs.8miu.com/read-26231.html