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 is nan in java?
Explain parallel processing in java8?
Which is better stringbuffer or stringbuilder?
What is the main advantage of passing argument by reference?
Explain inner classes ?
Which is better singleton or static class?
What does provide mean construction?
Is null false in java?
How do you convert boolean to boolean?
what is abstract class in Java?
Why object class is super class for every class in java?
What is stringjoiner ?
Can we execute a program without main() method?
What sorting algorithm does javascript use?
How do you sort in java?