Vector and ArrayList are very similar. Both of them represent a 'growable array', where you access to the elements in it through an index.<br>ArrayList it's part of the Java Collection Framework, and has been added with version 1.2, while Vector it's an object that is present since the first version of the JDK. Vector, anyway, has been retrofitted to implement the List interface.<br>The main difference is that Vector it's a synchronized object, while ArrayList it's not.<br>While the iterator that are returned by both classes are fail-fast (they cleanly thrown a ConcurrentModificationException when the orignal object has been modified), the Enumeration returned by Vector are not.<br><br>Unless you have strong reason to use a Vector, the suggestion is to use the ArrayList<br><br> <br>
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.