干得好:
List<Integer> integers = IntStream.range(1, 10)// <-- creates a stream of ints .boxed() // <-- converts them to Integers .collect(Collectors.toList()); // <-- collects the values to a listCollections.shuffle(integers);System.out.println(integers);
印刷品:
[8, 1, 5, 3, 4, 2, 6, 9, 7]



