public class Numbers{
public static void main(String args[]){
int oldArr[]=new int[10];
int newArr[]=new int[10];
for(int i=0;i<oldArr.length;i++){
oldArr[i]=i;
}
print(oldArr);
//System.out.println(oldArr[i]);
for(int i=0;i<oldArr.length;i++){
newArr[i]=oldArr[oldArr.length-1-i];
}
print(newArr);
}
public static void print(int temp[]){
for (int i=0;i<temp.length;i++){
System.out.println("数组是 "+temp[i]);
}
System.out.println("\n");
}
}
public static void main(String args[]){
int oldArr[]=new int[10];
int newArr[]=new int[10];
for(int i=0;i<oldArr.length;i++){
oldArr[i]=i;
}
print(oldArr);
//System.out.println(oldArr[i]);
for(int i=0;i<oldArr.length;i++){
newArr[i]=oldArr[oldArr.length-1-i];
}
print(newArr);
}
public static void print(int temp[]){
for (int i=0;i<temp.length;i++){
System.out.println("数组是 "+temp[i]);
}
System.out.println("\n");
}
}