-
集合的体系
1. 单列集合
2. 双列集合
-
Collection的常用方法
1. boolean add(E e)
添加元素,添加基本数据类型的元素有自动装箱的过程
2. boolean remove(Object o)
删除指定元素,删除成功返回true
3. boolean contains(Object o)
查询指定元素,查询成功范围true
4. int size()
返回集合中元素的个数
5. boolean isEmpty()
判断集合是否为空,如果为空返回ture
6. void clear()
清空该集合
7. boolean addAll(Collection<? extends E> c)
添加一个集合到末尾,添加成功返回ture
8. boolean containsAll(Collection<?> c)
如果此集合包含指定集合中的所有元素,则返回true
9. boolean removeAll