class SortInt_2 (2) int i,j,k,temp; void SortInt(int a1, int a2[])//降序排序 for(i=0; i<a1-1;i++) k=i; for(j=i+1;j<a1;j++) if( (3) )k=j;
if(k !=i) temp=a2[i];a2[i]=a2[k];a2[k]=temp;
public class test public static void main(String args[]) int a[]=10,55,100,35,87,90,100,16; SortInt_1 NewInt= (4) ; NewInt.SortInt(a.lenvh,a);//调用SortInt_1类的方法 System.out.println("升序排列的数据: "); for(int i=0;i<a.length;i++) System.out.print(a[i]+" ");