Collections
Vector implements list Interface. It maintains insertion order and it is thread safe as well as it is synchronized hence gives poor performance in searching, adding, deleting and updating of its elements.
It creates empty Vector with the default initial capacity of 10 which means that Vector will be re-sized when the 11th elements needs to be inserted into the Vector.
Vector would be 10th if Vector’s size = 10 till 10th elements and once one try to insert the 11th element It would become 20 (double of default capacity 10).
Vector are used in thread-safe environment
Published on March 28, 2019 02:28