[size=x-large]Arrays.asList("peter", "anna", "mike").forEach(e -> System.out.println(e));
Arrays.asList("peter", "anna", "mike").forEach((String e) -> System.out.println(e));
Arrays.asList("peter", "anna", "mike").forEach(e -> {System.out.println(e);System.out.println(e);System.out.println(e);});
一行代码遍历List
[/size]
Arrays.asList("peter", "anna", "mike").forEach((String e) -> System.out.println(e));
Arrays.asList("peter", "anna", "mike").forEach(e -> {System.out.println(e);System.out.println(e);System.out.println(e);});
一行代码遍历List
[/size]