public class BubbleSort {
/**
* 冒泡排序
* @param args
*/
public static void main(String[] args) {
int []a={10,1,2,5,4,5,25,7,11,9};
System.out.println(Arrays.toString(a));
for(int i=0;i<a.length;i++){
for (int j=0;j<a.length-i-1;j++){
if(a[j]>a[j+1]){
int t=0;
t=a[j];
a[j]=a[j+1];
a[j+1]=t;
}
}
}
System.out.println(Arrays.toString(a));
}
}