为方便复习,故整理常用集合类List、Set、Map等。

目录结构

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Colletion
|- List
| |- ArrayList
| |- Vector
| |- LinkedList
|
|- Set
| |- HashSet
| |- TreeSet
| |- LinkedHashSet
|
|- Queue
Map
|- HashMap
|- HashTable
|- TreeMap

List

ArrayList

排列有序,可重复

底层使用数组

查询快,增删慢

扩容公式:当前容量*1.5+1

Vector

排列有序,可重复

底层使用数组

查询快,增删慢

线程安全,效率低

扩容公式:当前容量*2

LinkedList

Set

HashSet

TreeSet

LinkedHashSet

Queue

###Map

####HashMap

####HashTable

####TreeMap