jdk里的ArrayList和LinkedList使用
这节课来试试使用JDK里的ArrayList和LinkedList
可以看到ArrayList实现了List接口
List接口继承了Collection接口,所有Collectiond 的子类都被称为集合类
List接口的方法如下:
常用方法:
add
addAll
remove
set
indexOf
get
toArray
sort
size
isEmpty
contain
iterator