int [] a1= new int[5]; int []a2= new int[5]; for(int i=0;i<9;i++) { for(int j=i;j<9;j++) { if(a1[i]>a2[j+1]) { int zhong =a1[i]; a1[i]=a2[j+1]; a2[j+1]=zhong; } }