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);

Comments

Popular posts from this blog

How to Fix ‘This file name is too long’ Error?

General Knowledge