List<Integer> intList = new ArrayList<>();
intList.add(1);
intList.add(3);
intList.add(4);
List<String> stringList = intList.stream().map(String::valueOf).collect(Collectors.toList());
List<Integer> integers = Arrays.asList(1, 2, 3, 4);
List<String> strings = integers.stream().map(x -> x + "").collect(Collectors.toList());
jdk8如何将List<Integer>转换为List<string>
最新推荐文章于 2022-09-13 09:31:36 发布