List<User> list = new User();
User user= new User();
user.setname("lisi0");
user.setage(2);
list .add(user);
User user= new User();
user.setname("lisi1");
user.setage(0);
list .add(user);
User user= new User();
user.setname("lisi"2);
user.setage(10);
list .add(user);
class User(){
private String name;
privae String age;
}
如今进行集合list 进行年纪排序呢???求大神解答
|
|