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);
Asked
Active
Viewed 35 times
0

Abhinav Gupta
- 2,225
- 1
- 14
- 30

Taps
- 27
- 6
-
Show your Student class – jarvo69 Jul 06 '19 at 05:56
-
Take a look at this question: https://stackoverflow.com/questions/1814095/sorting-an-arraylist-of-objects-using-a-custom-sorting-order – Bilal Naeem Jul 06 '19 at 06:05
1 Answers
0
Instead of separate arraylist,Create one model which has fields like gender,student... etc. And the try to sort that single arraylist.

sagar sonar
- 46
- 4