Comparator and Null

Sorting collections has been quite easy with the Comparator class. But how do you deal with possible null values in for instance a List? You probably see already the NullPointerExceptions fly around, but fear not!

May 3, 2023 ยท 2 min