java stream get max with condition code example Example: find max in stream java employees.stream().max(comparator).get();