what is the diff b/w arraylist and vector?
Answer Posted / srikanth reddy
Vector and ArrayList are very similar. Both of them
represent a 'growable array'
arraylist class is added in java/j2ee where has vector class
is before to jdk1.4 they just taken as it as in jdk1.4
the main difference is that Vector it's a synchronized
object, while ArrayList it's not.
for accesing elements of arraylist we can use iterator
for accesing elements of vectorlist we can use both iterator
and enumeraation
arraylist is faster in acessing of elements compared to
vector class
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain about exception propagation?
How to perform quicksort in java?
what is the difference between future and callable interface in java?
Is java still necessary?
What is oop in java?
What is java thread dump, how can we get java thread dump of a program?
Where are global variables stored?
Can we synchronize static methods in java?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?
What is the difference between multiple processes and multiple threads?
What is the difference between java applets and applications?
Can a main method be overloaded?
What does @override mean?
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
Explain how to force the garbage collection in java.