From 26349991799eff40a51588503979078518ffcebc Mon Sep 17 00:00:00 2001 From: yellowgg Date: Fri, 12 Jul 2019 09:11:32 +0800 Subject: [PATCH] Update ArrayList.md Fixed markdown grammar error --- docs/java/collection/ArrayList.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/java/collection/ArrayList.md b/docs/java/collection/ArrayList.md index c3e8dd47..f6578a7a 100644 --- a/docs/java/collection/ArrayList.md +++ b/docs/java/collection/ArrayList.md @@ -660,7 +660,7 @@ public class ArrayList extends AbstractList (3)private class SubList extends AbstractList implements RandomAccess (4)static final class ArrayListSpliterator implements Spliterator ``` -  ArrayList有四个内部类,其中的**Itr是实现了Iterator接口**,同时重写了里面的**hasNext()**,**next()**,**remove()**等方法;其中的**ListItr**继承**Itr**,实现了**ListIterator接口**,同时重写了**hasPrevious()**,**nextIndex()**,**previousIndex()**,**previous()**,**set(E e)**,**add(E e)**等方法,所以这也可以看出了 **Iterator和ListIterator的区别:**ListIterator在Iterator的基础上增加了添加对象,修改对象,逆向遍历等方法,这些是Iterator不能实现的。 +  ArrayList有四个内部类,其中的**Itr是实现了Iterator接口**,同时重写了里面的**hasNext()**, **next()**, **remove()** 等方法;其中的**ListItr** 继承 **Itr**,实现了**ListIterator接口**,同时重写了**hasPrevious()**, **nextIndex()**, **previousIndex()**, **previous()**, **set(E e)**, **add(E e)** 等方法,所以这也可以看出了 **Iterator和ListIterator的区别:** ListIterator在Iterator的基础上增加了添加对象,修改对象,逆向遍历等方法,这些是Iterator不能实现的。 ### ArrayList经典Demo ```java