When should objects stored in a Set implement the java.util.Comparable interface?
D.
TreeSet stores its elements in natural order, which is determined by casting the elements to Comparable and invoking their compareTo()
methods. If you add an element that isn't comparable to a tree set, you'll eventually get an exception.