关于数组的升序排列

       public class ScoresSort{

  public static void main (String[] args){

int[ ]   scores   =   new  int[ ] ; //输入数组组数

System.out.println("请输入5位学员的成绩:"); //输入数字

for(int = 0;  i< scores.length; i++;){

scores [ i ]  =  input.nextInt();

}

Arrays.sort(scores); //对数组进行升序排列

System.out.println("数字按升序排列:") ;

for (int = 0; i< scores){ //利用循环结构输出数字

System.out.print(scores[ i ] + "  ") ;

}

}

}

你可能感兴趣的:(关于数组的升序排列)