从大到小排的
看看成不
public class MaoPao {
public static void main(String[] args) {
int i,j,temp;
int[] a = {3,-56,78,15,20,951,-125,-64};
for(i=1;i<a.length;i++)
for(j=0;j<a.length-1;j++)
if(a[j]<a[j+1]){
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
for(i=0;i<a.length;i++)
System.out.print(a[i] + " ");
}
}