public void solution(){
List<Integer> givenList = Arrays.asList(1, 2, 3,4,5,6);
Collections.shuffle(givenList);
int randomSeriesLength = 3;
List<Integer> randomSeries = givenList.subList(0, randomSeriesLength);
}
原文地址:https://www.cnblogs.com/AllIhave/p/12037098.html
时间: 2024-10-08 01:47:13