public class ArrayExer06 {
public static void main(String[] args){
int arr1[]={34,54,3,2,65,7,34,5,76,34,67};
int arr2[]=new int[arr1.length];
for(int i=0;i<arr1.length;i++){
arr2[i]=arr1[arr1.length-1-i];
System.out.print(arr2[i]+"\t");
}
}
}
java数组元素的反转方式二
最新推荐文章于 2024-08-18 21:36:31 发布