这篇文章给大家介绍lambda表达式在java8中的使用方法,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。
创新互联公司-专业网站定制、快速模板网站建设、高性价比玉山网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式玉山网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖玉山地区。费用合理售后完善,十余年实体公司更值得信赖。定义 TantanitReader:
public class TantanitReader { private int age; private String loginName; private String realName; private String career; public TantanitReader() { } public TantanitReader(int age, String loginName, String realName, String career) { this.age = age; this.loginName = loginName; this.realName = realName; this.career = career; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getLoginName() { return loginName; } public void setLoginName(String loginName) { this.loginName = loginName; } public String getRealName() { return realName; } public void setRealName(String realName) { this.realName = realName; } public String getCareer() { return career; } public void setCareer(String career) { this.career = career; } @Override public String toString() { return "age:"+this.getAge()+",loginName:"+this.loginName +",realName:"+this.getRealName()+",career:"+this.getCareer(); } }