Sort Person objects by name descending, then salary ascending, and compare Comparable with Comparator.
Unlock detailed company stats for this questionUpgrade
How do you sort a list of Person objects in descending order by name, and if names are equal, in ascending order by salary? Discuss the choice between Comparable and Comparator.
Community answers
No answers contributed by the community yet.
Related courses

Course

Course
Course
