1).特点:
1).有序的
2).可以存储重复元素
3).可以通过“索引”访问。
2).新增方法:
1).增:public void add(int index , E e):将参数e添加到当前集合的index位置。【插队-基础班学过】
2).删:public E remove(int index):删除index索引位置上的元素【基础班学过】
3).改:public E set(int index, E e):将index位置上的元素替换为e【基础班学过】
4).查:public E get(int index):获取index索引位置上的元素。【基础班学过】
这四个方法的共同的特点:形参都带“int index——索引值”!

3.2 List的子类:ArrayList集合【无新增方法】

  1. ![image.png](https://cdn.nlark.com/yuque/0/2022/png/28958965/1654923802106-1dc8f09e-3182-413a-872a-2680c310afd4.png#clientId=u6d62c7a0-42c7-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=373&id=u872aa7f7&margin=%5Bobject%20Object%5D&name=image.png&originHeight=745&originWidth=720&originalType=binary&ratio=1&rotation=0&showTitle=false&size=1612626&status=done&style=none&taskId=u968b8c6e-4084-4d9e-b2fc-d25623052c3&title=&width=360) 增强for和普通for的选择:<br /> 1).如果循环中需要用到“循环变量”,就使用“普通for循环”。<br /> 2).如果仅仅需要从头到尾遍历集合,可以使用“增强for”比较方便。<br /> 但不能用于赋值。

3.3 List的子类:ArrayList集合-数组结构

1).ArrayList内部使用的“数组”实现:<br />![image.png](https://cdn.nlark.com/yuque/0/2022/png/28958965/1654923818077-0d4ae341-4e4a-4789-a9e4-8d6ad1d3b1d6.png#clientId=u6d62c7a0-42c7-4&crop=0&crop=0&crop=1&crop=1&from=paste&height=360&id=uf147f927&margin=%5Bobject%20Object%5D&name=image.png&originHeight=720&originWidth=1041&originalType=binary&ratio=1&rotation=0&showTitle=false&size=2252992&status=done&style=none&taskId=u3f627bb8-2a0c-487e-95cd-6b9151fb8bf&title=&width=520.5)<br />            <br />    2).特点:增删慢;查询快;<br />       适用:一次添加,多次查询