public class Demo01 {
public static void main(String[] args) {
ArrayList list = new ArrayList();
Scanner sc = new Scanner(System.in);
int score=0;
for (int i=0;i<10;i++){
System.out.println("请输入第" + (i + 1) + "个同学的成绩");
score=sc.nextInt();
list.add(score);
}
System.out.println("没有排序之前");
System.out.print("\t"+list);
System.out.println();
Collections.sort(list);
System.out.println("排序之后");
System.out.println("\t"+list);
}
}