| 本帖最后由 李会成 于 2013-2-18 11:34 编辑 
 复制代码public static void iteratorToou(List< ? extends Prerson > arr)      //  为什么我这里写泛型限制会出问题
        {
                                            Iterator<rerson> it = arr.iterator();
                                            while (it.hasNext()) ;
                                  Prerson p = it.next();
                                                           System.out.println(p.getName() + "......" + p.getAge();
         }
        }
}
     1.(List< ? extends Prerson > arr)   我在这里写泛型限定,为什么会报错,
      类型不匹配:不能从 Iterator<capture# 1- of  ? extends Prerson> 转换为 Iterator<rerson>
    2.求高人解释一下  这个泛型限定  看视频没有看懂~ 
   public static <T extends Comparable<? super T>> void sort(List<T> list)
 |