17.5.3 Filtering Strings Then Sorting Them in Case-Insensitive Descending Order
Lines 31–35 perform the same tasks as lines 24–28, but sort the String
s in descending order. Functional interface Comparator
contains default
method reversed, which reverses an existing Comparator
’s ordering. When applied to String.CASE_INSENSITIVE_ORDER
, the String
s are sorted in descending order.
Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.