Good day!
I have an object student with the following attributes:
class Student String name Date birthday
I used arrayList
You need to write a custom comparator.
Something like:
Collections.sort(studentList, new Comparator() { public int compare(Strudent a, Strudent b) { return a.birthday.compareTo(b.birthday); } });