Copy and sort Arraylist in android
Copy Arraylist :-
1) List<Integer> newList = new ArrayList<>(oldList);
2) arraylist2Object.addAll(arraylist1Object);
3) Collections.copy(arrayList2,arrayList1);
Sort ArrayList :-
1)Collections.sort(arraylist);
1) List<Integer> newList = new ArrayList<>(oldList);
2) arraylist2Object.addAll(arraylist1Object);
3) Collections.copy(arrayList2,arrayList1);
Sort ArrayList :-
1)Collections.sort(arraylist);
Comments
Post a Comment