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
Difference between string, stringbuffer and stringbuilder?
Can a constructor be protected?
What is a Null object?
What are daemon Threads in java?
Why do we use return statement?
What are wrapped classes in java programming?
Explain the meaning of java applet.
What are meta-annotations?
Explain java coding standards for variables ?
Can constructor be inherited?
Can we define private and protected modifiers for the members in interfaces?
What is string pool?
What is java reflection?
Explain how can you debug the Java code?
What do you mean by compiler?