Java 8 stream's .min() and .max(): why does this compile? - Stack Overflow
Comparator is a functional interface, and Integer::max complies with that interface (after autoboxing/unboxing is taken into consideration). It takes two int values and returns an int - just as you'd expect a Comparator to (again, squinting to ignore the ...