Hi Both vector and arraylist are growable arrays and the differnece is vector is synchronized and arraylist is not synchronized. How is synchronization done in vectors.
public synchronized Object set(int index, Object element) {}
But in the API of vectors only Object set(int index, Object element) is given .
if we give public synchronized Object set(int index, Object element) {} then arraylist will also be synchronized? Then what is the differnece between vector and arraylist?
public synchronized Object set(int index, Object element) {}
But in the API of vectors only Object set(int index, Object element) is given .
if we give public synchronized Object set(int index, Object element) {} then arraylist will also be synchronized? Then what is the differnece between vector and arraylist?