ArrayList and Vector

java.util.Vector was introduced with the first version of java development kit (JDK 1.1) and java.util.ArrayList  was introduced in java version 1.2 as a part of collections framework, later vector has also been retrofitted to implement List and became the part of the collections framework. Both ArrayList and Vector use array as a internal data structure and are dynamically resizable with default size zero and initial capacity 10.
 
 S.No  Vector  ArrayList
 1. All the methods in Vector are synchronized  Methods of ArrayList are not synchronized
 2.  Vector doubles the size of array when its size is increased  ArrayList increases by half of its size when its size is increased.
 
Rate this post

Leave a Reply