Comparator naturalOrder, reverseOrder and reversed

As a follow up of the Comparator comparing post, here we will learn about the Comparator naturalOrder, reverseOrder and reversed methods.

July 26, 2021

Comparator nullsFirst and nullsLast

Comparator nullsFirst and nullsLast methods returns a null-friendly comparator. It considers null to be less than or greater than any non-null value.

July 27, 2020

Comparator comparing

The Comparator is a comparison function in Java that imposes a total ordering on a collection of objects. The comparing is a static method in it

April 29, 2019