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 passing by reference faster?
Does java list allow null?
What is Enum in Java?
What does it mean to be immutable?
What does three dots mean in java?
Which is the best approach for creating thread ?
What is a java lambda expression?
What are the types of inner classes (non-static nested class) used in java?
What is pojo class in java?
Which method returns the length of a string?
What is the structure of java?
Can we override private constructor in java?
What does += mean in java?
What is singleton class example?
What is jdbc api?