Effective method to sort list in Java
There is already a reverse order Comparator built-in to Java. You could also use Arrays.asList(T...); like,

List&lt;Integer&gt; listOne = Arrays.asList((Integer) 1, 5, 10, 6);
System.out.println(listOne);
Collections.sort(listOne, Comparator.reverseOrder());
System.out.println(listOne);


And if you're using Java 8+, you could do the same with a Stream on one line (assuming you don't need to preserve the reverse sorted List) like

System.out.println(IntStream.of(1, 5, 10, 6).boxed().sorted(Comparator
            .reverseOrder()).collect(Collectors.toList()));