好像是用vector不行,用hashtable吧。这个东西是键值对应对象的。

解决方案 »

  1.   

    boolean remove(Object o) 
              Removes the first occurrence of the specified element in this Vector If the Vector does not contain the element, it is unchanged.
      

  2.   

    因为在Vector中,是以数组形式进行存储的,可以存放相同的对象,所以
    你用remove(Object o)进行删除,会删除第一次出现的参数对象,你可以
    通过remove(int index)进行删除。
      

  3.   

    推荐使用HashMap,实现了哈希功能,能存储关键字/值对!!并可根据关键字来取出值或者移出值!
      

  4.   

    使用
    Vector v = new Vector();
    v.removeElementAt(int index);//删除第index个object
    就可以满足你的要求了。