Hello! > The min() and max() methods are not null hostile. If you pass a > null-friendly comparator (such as returned by the `nullsFirst()` and > `nullsLast()` comparator combinators), nulls are not a problem.
No, it is the problem, the same as with findFirst(). Try it: Comparator<String> nullFriendly = Comparator.nullsFirst(Comparator.naturalOrder()); List<String> data = Arrays.asList("hello", null, "world"); System.out.println(Collections.min(data, nullFriendly)); // null -- correct System.out.println(data.stream().min(nullFriendly)); // NPE! With best regards, Tagir Valeev.