compareTo with generic objects! (Beginning Java forum at JavaRanch)
Pawel Pawlowicz wrote:Method compareTo doesn't work with type T because not all classes have compareTo method (and T stands for "any class"). Compiler won't allow you to put value.compareTo in your code because value might not have compareTo method. ......