简述HashSet,ArrayList、LinkedList、、LinkedHashSet集合的特性
- 可重复性、稳定性
说明:可重复性就是在集合中可以存储相同元素,稳定性就是存储和输出的顺序是一样的。
满足这两种特性的有所有实现List接口(List接口继承了Collection接口)的子类ArrayList,LinkedList、Vector。存储元素可为null。
Collection collection01=new ArrayList();
collection01.add(1);
collection01.add("花花");
collection01.add(4);
collection01.</