I have a list of objects that I want to sort according to their "date" attribute. Each object has a Date attribute which specifies its age. How can I sort these objects from the newest to the oldest? I heard of Comparator
but I don't know if it applies to dates.
Can somebody help me figure out how to do that?