public class Test {
public static void main(String[] args) {
List list = new ArrayList<>();
list.add("one");
list.add("two");
list.add("three");
//for循环
for (String s : list) {
System.out.println(s);
}
//lambda表达式
list.forEach(s -> System.out.println(s));
//lambda表达式的eta转换
list.forEach(System.out::println);
}
}