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
Considering notepad/ie or any other thing as process, what will happen if you start notepad or ie 3 times? Where 3 processes are started or 3 threads are started?
Can we create more than one object singleton class?
What is string value?
Can we use static class instead of singleton?
Can a top level class be private or protected?
Why singleton pattern is better than creating singleton class with static instance?
How to implement a multithreaded applet?
Is map ordered in java?
What are the benefits of operations in java?
Write a program to check string is palindrome without using loop?
Why put method is used?
What is a stack class in java ?
What is bufferedwriter?
What is a boolean output?
How do you add an element to an arraylist in java?