//冒泡法
public class MaxMinSort1 {
public static void BubbleSort(int array[]){
int i,j;
int len = array.length;
int temp;
for(i = 0;i < len-1;++i)
for(j = len-1;j > i;--j){
if(array[j] < array[j-1]){
temp = array[j];
array[j] = array[j-1];
array[j-1] = temp;
}
}
}
public static void main(String[] args){
int a[]={3,4,5,2,1,0};
BubbleSort(a);
for(int i=0;i<a.length;++i){
System.out.println(a[i]);
}
/*for(int b : a){
System.out.println(b);
}*/
}
}