(1)ArrayList类
主要有add,remove,removeat,insert四种方法,add用于将对象添加到arraylist的结尾处,remove方法用于从arraylist中移除特定对象的第一个匹配项,removeat方法用于移除arraylist的指定索引处的元素,insert方法用于将元素插入arraylist的指定索引处
(2)stack类
push,pop,peek(相当于数据结构的top指针)
(3)queue类
enqueue(入队),dequeue(移除并返回位于queue开始处的对象),peek(返回开始处的对象但不移除)
(4)hashtable(哈希表)类
它是一种键/值对集合
add(将带有指定键的元素添加到hashtable中)例如:
hashtab hash=new hashtable();
hash.add(“s1001”,“tom”);
remove(移除带有指定键的元素)
hash.remove(“s1001”);
(5)sortedlist类
也是键/值对集合,和哈希表不同的是这些键/值对是按键排序
方法有add,remove,removeat,同哈希表
add()