comparable接口;collections类;

排序:

collections.sort(list);

随机排序:

collections.shuffle(list);

反转排序:

collections.reverse(list); 

复制方法;

List<A> new List=Arrays.asList(new A[i]);

//默认长度为0;复制的时候需要先给一个长度,默认容量为10;

搜索方法;

binarysearch;二分搜索法

事先排序,然后进行查找   找不到的输出-1;

原文地址:https://www.cnblogs.com/hljj/p/6910300.html