Sort List in reverse in order

Eldar Nezametdinov picture Eldar Nezametdinov · Aug 6, 2013 · Viewed 73.5k times · Source

I have List list1 in direct order. List<String> list = Ordering.natural().sortedCopy(asu2);

How to change order. And I don't know how to rewrite methods from extends class, please write with examples or speak clearly.

Answer

morgano picture morgano · Aug 6, 2013

Use this:

Collections.reverse(list);