SyntaxFix
Write A Post
Hire A Developer
Questions
import static java.util.Comparator.naturalOrder; ... list.stream() .map(User::getDate) .max(naturalOrder()) .orElse(null) // replace with .orElseThrow() is the list cannot be empty