简体   繁体   中英

How can i sorted arraylist from 2 different arraylist? like two arraylist, gender and student. How to view the student details in genderwise

stringArrayList.add(gender_type);
stdentlists.add(new Stdentlists(id,gender_type,std_name,std_age,std_class));


Set<String> stringSet = new HashSet<String>(stringArrayList);
ArrayList<String> afterRemovingduplicate = new ArrayList<String>(stringSet);

代替单独的arraylist,创建一个模型,该模型具有诸如gender,student ...等字段。然后尝试对单个arraylist进行排序。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM