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 a treemap in java?
What does string intern() method do?
What happens if an exception is throws from an object's constructor?
describe method overloading
What method is used to specify a container's layout in java programming?
What is a boolean field?
How do you escape a string?
What is an arraylist in java?
Explain with example the concept of constant variable in java.
What is set string?
worst case complexities of Quick sort and Merge sort.
What is the difference between preemptive scheduling and time slicing in java programming?
What is the difference between static (class) method and instance method?
Can we declare the static variables and methods in an abstract class?
What is a “stateless” protocol ?