What is the best way to get min and max value from a list of Comparables that main contain null values?

What’s wrong with Collections.max?

And why do you care about null safety? Are you sure you want to allow nulls to be in your Collection?

Leave a Comment