更新时间:2023-02-14 10:21:16
IntStream.boxed
将 IntStream
转换为 Stream< Integer>
,然后您可以收集
到列表中:
IntStream.boxed
turns an IntStream
into a Stream<Integer>
, which you can then collect
into a list:
theIntStream.boxed().collect(Collectors.toList())