public class LambdaTest {
public static void main(String[] args) {
List list = Arrays.asList(5,2,3,1,9);
int N = list.size();
int t = 0;
Collections.sort(list);
System.out.println("順序--"+list);
Collections.reverse(list);
System.out.println("倒敘--"+list);
Collections.shuffle(list);
System.out.println("隨機--"+list);
}
}
順序--[1, 2, 3, 5, 9]
倒敘--[9, 5, 3, 2, 1]
隨機--[9, 1, 5, 2, 3]
