代码
提交代码
import java.util.stream.Stream;
import java.util.List;
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());
System.out.println(collected);
}
}
运行结果