for example, using the following:
the collection Set and sorting as we go.
orCode:Set sortedObject= new TreeSet<SomeObject>(comparator);
the collection list and sorting when all elements are in the list.
what are the adv and disadv in terms of memory usage and execution time?Code:Collections.sort(list, comparator);![]()




Reply With Quote