创建字符串链表和输出的简易方式
代码:
List<String> list1= Arrays.asList("1","2","3","4");
list1.stream().forEach(System.out::println);
输出:
1 2 3 4
END
代码:
List<String> list1= Arrays.asList("1","2","3","4");
list1.stream().forEach(System.out::println);
输出:
1 2 3 4
END