public class helloWorld {
public static void main(String[] args){
//定义一个长度为5的数组
int arr[] =new int [5];
//填充随机数
for(int a=0;a<=arr.length-1;a++){
arr[a] = (int)(Math.random()*100);
System.out.println(arr[a]);
}
System.out.println("反转数组arr***");
//反转数组
for(int i=0;i
int temp = arr[i];
arr[i] = arr[arr.length-1-i];
arr[arr.length-1-i]=temp;
}
for(int b=0;b<=arr.length-1;b++){
System.out.println(arr[b]);
}
}
}