Read the code source and know how they works1.Arraylist and Vector implement the interface List.
2.the List interface extends the Collection class.
3. Vector is security in multhread,but arraylist not.
4.what is their bottom implemention,it is Array.
we can see what is array:
5: the construct method of arraylist
//构造一个具
有指定初始容量的空列表。
public ArrayList(int initialCapacity)
//构造一个初始容量为10的空列表。
public ArrayList()
//构造一个包含指定 collection 的元素的列表
public ArrayList(Collection<? extends E> c)