Answers for "java sort arraylist of objects by field descending"

0

java sort arraylist of objects by field descending

List<User> sortedUsers = users.stream()
  .sorted(Comparator.comparing(User::getCreatedOn).reversed())
  .collect(Collectors.toList());
Posted by: Guest on December-28-2020

Code answers related to "java sort arraylist of objects by field descending"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language