import java.util.ArrayList;
import java.util.Collections;
public class test {
public static void main(String[] args) {
int a = 3;
int c = 6;
int b = 5;
int e = 2;
int f = 4;
ArrayList
list.add(a);
list.add(c);
list.add(b);
list.add(e);
list.add(f);
Collections.sort(list);//对list进行排序
System.out.println(list);
}
}
讲真 这玩意很简单 但是会写的都懒得写