帮助上说功能一样,如下:This method is identical in functionality to the add(Object) method (which is part of the List interface).pws:我注意了一下,add返回boolean,addElement是void,呵呵,帮楼主定一下

解决方案 »

  1.   

    addElement(Object)方法是从1.0就有的,
    add(Object)方法是1.2以后才有的,是实现接口List中的方法这两个函数,参数一样,功能一样,返回值不一样
      

  2.   

    addElement(Object)方法是在vector的最后增加一个位置来放objcet
    add(Object)方法应该会不会是增加半个或一个vector长度后再放object呢本人瞎猜的 不知各位大侠怎么看
      

  3.   

    瞎猜一通,不如去看看Vector的源码.Vector在java2后实现了List接口.之所以还保留addElement是为了保证向后兼容性.
      

  4.   

    addElement(Object obj)
    Adds the specified component to the end of this vector, increasing its size by one. The capacity of this vector is increased if its size becomes greater than its capacity.