List is an interface that is implemented by a number of classes with differeny characteristics (e.g. ArrayList and LinkedList). A more proper comparison would be between Vector and ArrayList. The major difference is that all methods of Vector are synchronized, making it ready to use in multi-threaded code. ArrayList's methods aren't synchronized, making it generally faster. In most cases you should use ArrayList instead of Vector.
Vector and Hashtable are the very old datastructure in java.in other words you can these are the two data structure earlier java had. So ,keeping in mind it to use with the mulit-threaded enviornment ,methods of both has been made synchronized( you can exlpore the API). As we know ,synchronization always cause the performance hit.There are sometimes while devloping software where you do not need synchronization there comes the use of ArrayList(depends according to situtation),which gives you linear searching,methods of arraylist are not synchronized.for small size database or elements you can not realise the difference.Both behaves the same way. But genrally it is discourage to use the vector where you do not need synchronization. If you want you can synchronize the methods of Arraylist ,by using the Collections class where no. of utility methods has been given.you can use it according to your need. Hope the above answer will be helful for you anyway.
Joined: Mar 22, 2005
So, from ArrayList and Vector whatever i use i will get same result barring quickness of ArrayList?
Yes, provided that multi-threadedness makes no difference.
May you make a genral picture of collection APIs for easy understanding as i am feeling lost is the api.
The API designers decided that not all Vector uses needed to be thread-safe, so they gave the developers a choice by providing a class that isn't thread-safe by default. (Of course, using the Collections classes has other benefits as well.) ArrayList can still be used in multi-threaded environments; it's just the developers need to decide which accesses need to be synchronized.