Lambda表达式过滤数组
2021-01-29 17:13
标签:zha lambda表达式 UNC lte san 数组 print image 表达 Lambda表达式过滤数组 标签:zha lambda表达式 UNC lte san 数组 print image 表达 原文地址:https://www.cnblogs.com/zhvip/p/12831235.htmlpublic class Person {
private int age;
private String name;
public Person(String name,int age) {
this.age = age;
this.name = name;
}
public int getAge() {
return age;
}
public String getName() {
return name;
}
@Override
public String toString() {
return "Person{" +
"age=" + age +
", name=‘" + name + ‘\‘‘ +
‘}‘;
}
}
public class PersonTest {
public static void main(String[] args) {
Person person1 = new Person("zhangsan",20);
Person person2 = new Person("lisi",30);
Person person3 = new Person("wangwu",40);
Person person4 = new Person("zhaoliu",50);
List