Deepa Sreedhara wrote:I did not understand the first sentence much, "As you know, it is possible to create, and then use a TreeSet that works on objects that are not Comparable."
You can configure a TreeSet to work with non-Comparable instances, meaning instances that don't support the Comparable interface, and it can work fine. It can work correctly, without any Runtime exceptions, assuming that you provided a Comparator when creating the TreeSet.
Henry