Differences个
如果没有使用向量的具体要求,请使用ArrayList.
Synchronization
如果多个线程同时访问一个ArrayList,那么我们必须从外部同步代码块,该代码块可以从 struct 上修改列表,也可以简单地修改一个元素. struct 修改是指从列表中添加或删除元素.设置现有图元的值不是 struct 修改.
Collections.synchronizedList
通常在创建列表时使用,以避免对列表的意外非同步访问.
Data growth
在内部,ArrayList和Vector都使用数组保存其内容.将元素插入ArrayList或Vector时,如果对象空间不足,则需要扩展其内部array.A Vector defaults to doubling the size of its array, while the ArrayList increases its array size by 50 percent.