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
What do bitwise operators do?
What is string in java?
What are the differences between forwarding () method and sendredirect() methods?
Is final static java?
Tell us something about set interface.
Explain the transient field modifier?
how to split string in java?
What is hashset in java?
What is proper subset?
How do you create a null object?
What is the difference between C++ and Java and your preferences?
What is the purpose of the finalize() method?
Why main method is called first in java?
List some important features of java 10 release?
Explain reverse a linked list iterative solution in java?