I have a list of Integer list and from the list.stream() I want the maximum value. What is the simplest way? Do I need comparator?
Integer
list
list.stream()
int max = list.stream().reduce(Integer.MIN_VALUE, (a, b) -> Integer.max(a, b));