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 are assembly attributes?
What is cr keyboard?
When should you use arraylist and when should you use linkedlist?
What is generics in java interview questions?
What will happen to the exception object after exception handling?
what is bmg file and how to create that files?what will it contailn?
Is java a virus?
What are different ways of object creation in java ?
State differences between C and Java?
Are true and false keywords?
Can list be final in java?
What are predefined functions?
What is the argument in java?
What is array length?
Can a class extends itself in java?