Hi,
It is one of the important topics in java.
For dynamically resizable array we use ArrayList.
ArrayList provides us fast access as compare to simple
array.
1. As we go to synchronization, Vector is synchronized means at a single time one thread can use the
code. ArrayList is not synchronized.
2.Performance
ArrayList is faster than Vector because ArrayList is not synchronized.
So in ArrayList multiple thread can access code at a single point of time.
3. We dont need to define increment size in ArrayList but need to define in case of Vector.
4. Vector has the property to use both Enumeration and Iterator for traversing while ArrayList can only
use Iterator.
If anyone wants to add points, just comment on it your points or suggestions.
0 Comment(s)