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
Is age discrete or continuous?
Why hashset is used in java?
Can we pass null as argument in java?
What is the function of static in java?
Can you explain the meaning of aggregation and composition
What is the size of int in 64-bit jvm?
what is instanceof operator used in java?
How do you insert a line break?
Explain an algorithm to find depth of a binary tree.
What is the synonym of string?
What is the purpose of the System class?
What is join () in java?
What is the difference between ArrayList and Vector? which one is better in Java
List some important characteristics on jre
What is hash table in java?