News for hackers. Stuff that matters.
Re:Java for Everything by Roboprog on Monday December 01, 2014 @02:59AM (#8679948)
Lambda expression for comparator can be further shortened (for numeric types, descending):

( o1, o2) -> o2 - o1

No ternaries or else-ifs required. Swap o1 and o2 if you want ascending.

There are no comments on this comment yet.