Tech Master Tutorials
Email Facebook Google LinkedIn Pinterest Twitter
Home Java Java 8 Java Interview Questions Java Programming

Vector

Internal Implementation details of Vector:

Vector is a Dynamic Array implementation of the List interface. Vector is synchronized otherwise implementation of Vector is similar to ArrayList
Go to ArrayList and check internal implementation for ArrayList.



Vector and ArrayList both used an Array to store the elements internally. If at any point Array is filled up to its threshold capacity, a new Array is created with more capacity and all the elements of the old array are copied to this array and this new array becomes the storage for the Vector/ArrayList elements.