1. 程式人生 > >java foreach

java foreach

nbsp col name ring AS array reac foreach sys

List<String> names = new ArrayList<>();
        names.add("zhangsan");
        names.add("lisi");
        names.forEach(name-> System.out.println(name));
        names.forEach(System.out::println);

java foreach