posted 14 years ago
Kim, I couldn't properly understand what you are trying to say, but the syntax <T extends Comparable<? super T>> is used because of a reason. Lets take an example
Now if you see, MySubClass actually implements Comparable<MyClass> (through inheritance). This is where the syntax <T extends Comparable<? super T>> is useful. If the syntax of the sort method was <T extends Comparable<T>>, then there would've been a compile time error if we tried to pass a List<MySubClass> to the sort method as T i.e. MySubClass doesn't implement Comparator<MySubClass>. So in the syntax <T extends Comparable<? super T>> if we think that T is MySubClass, then in Comparable<? super T>, the ? becomes MyClass...