My study notes contain the following:
If the objects you add to a Set do not implement Comparable you will get a ClassCastException when you add the second object. The JVM is trying to cast this object to a Comparable in order to compare it to the first one.
Assuming this note is correct, why does the object first have to be cast to Comparable?