关于Vector,菜鸟的一个低级问题 好像是用vector不行,用hashtable吧。这个东西是键值对应对象的。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 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. 因为在Vector中,是以数组形式进行存储的,可以存放相同的对象,所以你用remove(Object o)进行删除,会删除第一次出现的参数对象,你可以通过remove(int index)进行删除。 推荐使用HashMap,实现了哈希功能,能存储关键字/值对!!并可根据关键字来取出值或者移出值! 使用Vector v = new Vector();v.removeElementAt(int index);//删除第index个object就可以满足你的要求了。 不能连接到VM 高手才进来,很难的问题 基于 xx 模式的j2se和j2me的融合方案的设计与实现 大家都来讨论! 小程序,大问题 请问各位高手:java类在内存中驻留的多少时间?什么时候被卸载? 请教如何是实现单据的定制 用swing如何使子窗口始终在前、使用户无法使用父窗口? 急:Java访问MySQL数据库的环境设置和几个问题 请问哪里能找到SCJP的最新模拟练习题? jdk1.3错误:Error opening registry....... 请教各位哥哥,姐姐,我是java初学者!请问java中怎么获得计算机的名字,如何更改JFrame坐上角的图标,在线等 关于线程的启动和停止
Removes the first occurrence of the specified element in this Vector If the Vector does not contain the element, it is unchanged.
你用remove(Object o)进行删除,会删除第一次出现的参数对象,你可以
通过remove(int index)进行删除。
Vector v = new Vector();
v.removeElementAt(int index);//删除第index个object
就可以满足你的要求了。