List<Integer> strIds = new ArrayList<>(); strIds.add(1); strIds.add(2); List<String> strings = strIds.stream().map(x -> x + "").collect(Collectors.toList());
java8 int集合转字符串集合
最新推荐文章于 2024-04-17 00:34:12 发布
List<Integer> strIds = new ArrayList<>(); strIds.add(1); strIds.add(2); List<String> strings = strIds.stream().map(x -> x + "").collect(Collectors.toList());