Answers for "reverse a string to arraylist"

5

how to reverse order of arraylist

ArrayList<Integer> arrlist = new ArrayList<Integer>();
//This is how to reverse arrlist's oringinal order.
Collections.reverse(arrlist);

//This is how to sort in a reverse order
 Collections.sort(arrlist, Collections.reverseOrder());
Posted by: Guest on September-06-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language