1、List
List包含ArrayList、LinkedList、Vector、Stack
需要注意到是Vector是基于synchronized实现的线程安全的arrayList,Stack继承自Vector,提供了LIFO的弹出和压入操作,提供了push、pop和peek操作。
2、Set
Set 包含HashSet和TreeSet。Set是不允许重复元素的,因为Hashset基于HashMap实现。
1、List
List包含ArrayList、LinkedList、Vector、Stack
需要注意到是Vector是基于synchronized实现的线程安全的arrayList,Stack继承自Vector,提供了LIFO的弹出和压入操作,提供了push、pop和peek操作。
2、Set
Set 包含HashSet和TreeSet。Set是不允许重复元素的,因为Hashset基于HashMap实现。