What is the difference between Array list and vector in Java?

anyone please provide deep information

Replies (2)
Quick Summary
This discussion clarifies the distinctions between Java's ArrayList and Vector, both of which implement the List interface and preserve insertion order. Key differences include synchronisation (Vector is synchronised, ArrayList is not), capacity increment (Vector doubles its size, ArrayList increases by 50%), and performance (ArrayList is generally faster due to being non-synchronised). Vector is also noted as a legacy class compared to ArrayList.

ArrayList and Vector both implements List interface and maintains insertion order.

However, there are many differences between ArrayList and Vector classes that are given below.

ArrayList Vector
1) ArrayList is not synchronized. Vector is synchronized.
2) ArrayList increments 50% of current array size if the number of elements exceeds from its capacity. Vector increments 100% means doubles the array size if the total number of elements exceeds than its capacity.
3) ArrayList is not a legacy class. It is introduced in JDK 1.2. Vector is a legacy class.
4) ArrayList is fast because it is non-synchronized. Vector is slow because it is synchronized, i.e., in a multithreading environment, it holds the other threads in runnable or non-runnable state until current thread releases the lock of the object.
5) ArrayList uses the Iterator interface to traverse the elements. A Vector can use the Iterator interface or Enumeration interface to traverse the elements.

If it is not against the community guidelines I would suggest some links regarding this,

https://www.javatpoint.com/difference-between-arraylist-and-vector

https://www.geeksforgeeks.org/vector-vs-arraylist-java/

I hope this will work for you.

 

Thanks & Regards

Seema

Leave a Reply

Your are not logged in . Please login to post replies

Click here to Login / Register  

Company
10 October 2026
Accounts Associate Level 1

Abic and Mani Chartered Accountants

Kottayam

B.Com

View Details
Company
ARTICLESHIP 28 September 2026
Junior Accountant

J S P M & Associates LLP

Pune

B.Com

View Details
Company
14 October 2026
GST & TDS ASSISTANT

AGGARWAL SANJAY & ASSOCIATES

New Delhi

B.Com

View Details
Company
22 September 2026
Account Assistant

Chirag P Shah & Co. Chartered Accountant

Pune

B.Com

View Details
Company
30 September 2026
Senior Accounts Executive

Codeboard Technology

Chennai

MBA

View Details
Company
19 October 2026
Accountant

Jari Saree Center

New Delhi

Others

View Details
Company
14 October 2026
Accountant

Rize.farm

Bengaluru

B.Com

View Details
Company
12 October 2026
AUDIT , ACCOUNTS AND TAXATION

KDSS

New Delhi

B.Com

View Details