public class Test {
public static void main(String[] args){
int a[] = {12,73,25,78,35,45,24};
Test t = new Test();
int temp = 0;
for(int i=1;i<a.length;i++){
temp = a[i];
a[j+1] = a[j];
}
a[j+1] = temp;
}
for (int i : a) {
System.out.printf(i+" ");
}
}
}
public static void main(String[] args){
int a[] = {12,73,25,78,35,45,24};
Test t = new Test();
int temp = 0;
for(int i=1;i<a.length;i++){
temp = a[i];
int j = i-1;
//把比temp大的数向后移动
a[j+1] = a[j];
}
a[j+1] = temp;
}
for (int i : a) {
System.out.printf(i+" ");
}
}
}