Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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());
 
PREVIOUS NEXT
Tagged: #reverse #order #arraylist
ADD COMMENT
Topic
Name
2+8 =