what is the difference between ArrayList and Vector
Answer Posted / m.sridhar
ArrayList and vector both are dynamically growing arrays.
ArrayList is not thread safe where as vector is thread safe.
vector is legacy class and ArrayList is newly added.
by default ArrayList capacity is 0 where as Vector intial
capacity is 10.
vector is growing by its size doubled.
ArrayList is increse by its size half(50%)
| Is This Answer Correct ? | 47 Yes | 6 No |
Post New Answer View All Answers
What is public static?
What are the 8 primitive data types in java?
How java uses the string and stringbuffer classes?
What is public/private protected in java?
Can a lock be acquired on a class in java programming?
Explain the use of shift operator in java. Can you give some examples?
What are the basic concepts of OOPS in java?
What are the benefits of immutable objects?
What do the thread?class methods run() and start() do?
Can variables be used in java without initialization?
What is object of class in java?
why Interface used?
What is the final keyword?
What is this () in java?
What is passing by reference in java?