标签:operator shuffle integer 随机 and shuff sublist void length
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);
}
标签:operator shuffle integer 随机 and shuff sublist void length
原文地址:https://www.cnblogs.com/AllIhave/p/12037098.html