java8 Stream collect Collectors

//Collectors toList streamArr.collect(Collectors.toList()); List<Integer> collectList = Stream.of(1, 2, 3, 4) .collect(Collectors.toList()); System.out.println("collectList: " + collectList);
相關文章
相關標籤/搜索