首先新建一个实体类Person@DatapublicclassPerson{/**编码*/privateStringcode;/**名字*/privateStringname;publicPerson(Stringcode,Stringname){this.code=code;this.name=name;}}实例化三个对象放入list集合中publicstaticvoidmain(String[]args){Personperson1=newPerson("001","张三");Personperson2=newPerson("002","李四");Personperson3=newPerson("002","王五");...
继续阅读 >