Skip to content

Commit 2634999

Browse files
authored
Update ArrayList.md
Fixed markdown grammar error
1 parent 7ba997e commit 2634999

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/java/collection/ArrayList.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ public class ArrayList<E> extends AbstractList<E>
660660
(3)private class SubList extends AbstractList<E> implements RandomAccess
661661
(4)static final class ArrayListSpliterator<E> implements Spliterator<E>
662662
```
663-
  ArrayList有四个内部类,其中的**Itr是实现了Iterator接口**,同时重写了里面的**hasNext()**,**next()**,**remove()**等方法;其中的**ListItr**继承**Itr**,实现了**ListIterator接口**,同时重写了**hasPrevious()**,**nextIndex()**,**previousIndex()**,**previous()**,**set(E e)**,**add(E e)**等方法,所以这也可以看出了 **Iterator和ListIterator的区别:**ListIterator在Iterator的基础上增加了添加对象,修改对象,逆向遍历等方法,这些是Iterator不能实现的。
663+
  ArrayList有四个内部类,其中的**Itr是实现了Iterator接口**,同时重写了里面的**hasNext()**, **next()**, **remove()** 等方法;其中的**ListItr** 继承 **Itr**,实现了**ListIterator接口**,同时重写了**hasPrevious()**, **nextIndex()**, **previousIndex()**, **previous()**, **set(E e)**, **add(E e)** 等方法,所以这也可以看出了 **Iterator和ListIterator的区别:** ListIterator在Iterator的基础上增加了添加对象,修改对象,逆向遍历等方法,这些是Iterator不能实现的。
664664
### <font face="楷体" id="6"> ArrayList经典Demo</font>
665665

666666
```java

0 commit comments

Comments
 (0)