Tuesday, 6 December 2016

What is Difference Between ArrayList and Vector In Java ?

Here get all the differences between ArrayList and Vector In Java.Both are the implementation classes of List interface in Java.


ArrayList
Vector
ArrayList is not thread-safe.
Vector is thread-safe.
Its performance is fast because it is not thread-safe.
Its performance is slow because it is thread-safe.
Incremental size cannot set in ArrayList.
Incremental size can set in Vector.
ArrayList only use Iterator to traverse.
Vector uses Enumeration and Iterator both to traverse.
ArrayList was introduced in Java Version 1.2.
Vector is from the first version of Java.



      
Blog Author - Pushkar Khosla,
Software Developer by Profession with 3.0 Yrs of Experience , through this blog i'am sharing my industrial Java Knowledge to entire world. For any question or query any one can comment below or mail me at pushkar.itsitm52@gmail.com.

This blog is all about to learn Core Java ,Interview Programs and Coding tricks to polish your Java Knowledge. If you like the content of this blog please share this with your friends.



1 comment: