//从小到大排列
public class TestMaoPao {
public void testMaoPao(){
int arr[] = {-3,6,0,9,4};
for(int i=1;i<arr.length;i++){
for(int j=0;j<arr.length-i;j++){
if(arr[j]>arr[j+1]){
int mn;
mn=arr[j];
arr[j]=arr[j+1];
arr[j+1]=mn;
}
}
}
for(int i=0;i<arr.length;i++){
System.out.print(" "+arr[i]+" ");
}
}
public static void main(String[] args) {
TestMaoPao st =new TestMaoPao();
st.testMaoPao();
}
}