tel-ran-de / BE10-Basic

Basic Java Group 10
1 stars 8 forks source link

HW 11-05-2020 - Comparable/Comparator #13

Open sergeylukichev opened 4 years ago

sergeylukichev commented 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.