Java中的集合类主要包括Collection和Map两种,其中Collection储存着对象的集合,而Map则储存着键值对(Key-Value)的映射表,具体如下:
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNTI2NDgucG5n?x-oss-process=image/format,png)
以下为各类的继承结构:
1 Collection
1.1 List
1)Stack
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNDU5NTkucG5n?x-oss-process=image/format,png)
2) ArrayList
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNDU4MDEucG5n?x-oss-process=image/format,png)
3)LinkedList
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNDU2MzIucG5n?x-oss-process=image/format,png)
1.2 Queue
1)PriorityQueue
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNDU0MjUucG5n?x-oss-process=image/format,png)
1.3 Set
1) HashSet
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNDQ3MDYucG5n?x-oss-process=image/format,png)
2)LinkedHashSet
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNDUxNDYucG5n?x-oss-process=image/format,png)
3) TreeSet
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNDUyNTMucG5n?x-oss-process=image/format,png)
2 Map
1) HashMap
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNTAxNDEucG5n?x-oss-process=image/format,png)
2) TreeMap
![](https://imgconvert.csdnimg.cn/aHR0cHM6Ly9tb290b25nLm9zcy1jbi1oYW5nemhvdS5hbGl5dW5jcy5jb20vaW1hZ2UvMjAyMDA2MDIxNTAyNTIucG5n?x-oss-process=image/format,png)