Ok this is a tricky one. I have a list of Sets. I would like to sort the objects in the Sets in an order.
Imagine each set as repressenting a class in a school. Each
You may want to look at using a SortedSet for example a TreeSet. This allows you to provide a Comparator which in your case can compare the name of the Person.
SortedSet
TreeSet
Comparator
Person