Hi,
I have a class and I've implemented the Comparable interface for it so I can use Collections.sort() on it. Is there any way to do a one line reverse sort? For right now I am doing:
ArrayList<MyClass> m;
Collections.sort(m);
Collections.reverse(m);
in order to reverse it..... the comparable interface is already defined, so shouldn't there be some method to just use that interface to do a reverse sorting for you?
Thanks
Start Free Trial