List<String> collect = new ArrayList<>();
collect.add("123");
collect.add("456");
List<Long> userIdList = collect.stream().map(item -> Long.parseLong(item)).collect(Collectors.toList());
Lambda表达式将 List<String> 转 List<Long>
最新推荐文章于 2025-06-26 09:03:36 发布