Open sergeylukichev opened 4 years ago
Implement a function which accepts a list of Persons (String firstName, String lastName, int age) and sorts them by either firstName, lastName or age.
Use interface Comparable for default order (by firstName) and implement your own Comparators to provide sorting by lastName and age.
Implement a function which accepts a list of Persons (String firstName, String lastName, int age) and sorts them by either firstName, lastName or age.
Use interface Comparable for default order (by firstName) and implement your own Comparators to provide sorting by lastName and age.