集合:大致分为两部分
单列集合:集合中只有一列数据
双列结合: 有两列数据
Collection 是接口 Collections是工具类
Collection的分类
Collections
List集合特点:元素是有序列 可重复 可索引的。
Set 无序 不重复 无索引。
List是一个接口 ArrayList和LinkedList是他们的实现类
list的方法
add()添加 remove删除 set 设置 get 得到
ArrayList
查找的时候是根据索引查找所以就是很快
ArrayList
LinkedList
应用场景:用来设计队列
Set
HashSet底层原理
TreeSet
Map集合
Map也是一个接口
HashMap
TreeMap