Vector
- The underlying data structure is resizable or growable Array.
- Insertion order is preserve.
- Duplicate objects are allow.
- Null insertion is possible.
- Hetrogenious objects are allow.
- Vector class implements Serializable, Clonable & RandomAccess interface.
- Best suitable for frequent operation is retrieval.
- Worst choice is frequent operation is insertion or deletion on middle.
- Every method present in Vector class is Synchronized. Hence vector object is thread safe.
Different between ArrayList and Vector:-
ArrayList |
Vector |
|
|
Hello! I am Narayanaswamy founder and admin of narayanatutorial.com. I have been working in the IT industry for more than 12 years. NarayanaTutorial is my web technologies blog. My specialties are Java / J2EE, Spring, Hibernate, Struts, Webservices, PHP, Oracle, MySQL, SQLServer, Web Hosting, Website Development, and IAM(ForgeRock) Specialist
I am a self-learner and passionate about training and writing. I am always trying my best to share my knowledge through my blog.