Difference between Vector and Arraylist is the most common Core Java Interview question you will come across in Collection . This question is mostly used as a start up question by the Interviewers before testing deep roots of the Collection . Vector , ArrayList classes are implemented using dynamic...
2)Resize:Both ArrayList and Vector can grow and shrink dynamically to maintain the optimal use of storage, however the way they resized is different. ArrayList grow by half of its size when resized while Vector doubles the size of itself by default when grows. 3)Performance: ArrayList gives b...
As per the Vectorjavadoc, the Enumeration returned by Vector is not fail-fast. On the other side the iterator and listIterator returned by ArrayList arefail-fast. Legacy?: The vector was not the part of collection framework, it has been included in collections later. It can be considered as...
the programmer does not need to know the size of the arraylist when he/she is defining it. Vector can also be seen as an array that can grow in size. Vectors can be easily allocated and can be used to when the required size of the storage is not known until runtime. ...
There are two basic differences that distinguish ArrayList and Vector is that Vector belongs to a legacy classes that were reengineered to support the collection classes whereas, an ArrayList is a standard collection class. Another important difference i