代码
提交代码
import java.util.List;
import java.util.stream.Stream;
import java.util.stream.Collectors;
public class Test{
public static void main(String...s){
List<String> collected = Stream.of("a","b","c").collect(Collectors.toList());
List<String> upperCaseList = collected.stream().map(e->e.toUpperCase()).collect(Collectors.toList());
System.out.println(upperCaseList);
}
}
运行结果