在Java 8中stream().map(),您可以将对象映射为其他对象。 List<String> collect = alpha.stream().map(String::toUpperCase).collect(Collectors.toList()); System.out.println(collect); //[A, B, C, D]
posted on 2019-04-12 20:05 gendway 阅读(149) 评论(0) 编辑 收藏 举报