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 immutability in java?
Can we override private method?
What is character in data type?
In the below example, how many string objects are created?
How many types of threads are there in java?
What is ph and buffers?
Write a code to create a trigger to call a stored procedure
What are the types of inner classes (non-static nested class) used in java?
In java, how we can disallow serialization of variables?
What language is an assembler written in?
what is static import in java? Explain
Can we change the value of static variable?
Which class is used by server applications to obtain a port and listen for client requests?
What is the purpose of the system class in java programming?
Are strings immutable in java?