ArrayList<E> extends AbstractList<E>
        implements List<E>……钟的E 是什么意识

解决方案 »

  1.   

    E就是你要放在List中的数据类型
      

  2.   

    表示范型,你在用的时候在<>里写上自己的类型
      

  3.   

    这是jdk1.5及以上版本提供的泛型功能,是说你在ArrayList存储的数据必须是E所指的类型。
    比如ArrayList<String> al = new ArrayList<String>();就表示这个ArrayList只能存储String类型的元素,从而在一定程度上保证类型转换的安全。
      

  4.   

    Type Parameter Conventions
    You have already seen the angle bracket and single letter notation used to 
    represent a type parameter. By convention, a type parameter is a single, 
    uppercase letter — this allows easy identification and distinguishes a type 
    parameter from a class name. The most common type parameters you will see are:<T> — Type
    <S> — for Type, when T is already in use
    <E> — Element (used extensively by the Java Collections Framework)
    <K> — Key
    <V> — Value
    <N> — Number