public static <T extends Comparable<? super T>> void sort (List list)的理解
(1)首先:public static void sort(List list)
(2)为了安全性加泛型:public static void sort(List list)
(3)想要排序先比较,要有可比较性,因此T必须是Comparable的子类:public static void sort(List list)
(4)Comparable接口也有泛型:public static <T extends Comparable> void sort(List list)
(5)T的父类也行,<? super T>表示Comparable<>中的类型下限为T:public static <T extends Comparable<? super T>> void sort (List list)