answersLogoWhite

0

1)Synchronization: Vector is synchronized and arraylist are not. 2)Increment size: Vector can increment the size by double,arraylist can increment it by 50%.

2)The default size of vector has 10, arraylist have 0.

3)we can specify the increment size with the vector and with arraylist we can't.

4)Arraylist is very fast as it is non-synchronized.

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What are the requirements to download a java arraylist?

The requirements to download a java arraylist are a pc with java software installed. A java arraylist is used to store a group of elements in a specific order.


How can you create array of an object in java?

Array's can hold only primitive data types. if you want a collection of objects you must use an ArrayList or a Vector.


How many number of objects we can store in an ArrayList. Is there any limit?

No. there is actually no such limit in any of the collections in java. The arraylist and vector are the most commonly used collections and they take thousands of objects. I have personally used them with atleast a 100,000 thousand objects.


What does it mean that a vector is synchronized in Java?

It means that multiple threads can safely read/modify data from a vector at the same time. Attempting to do that with an unsynchronized data type - an ArrayList, for instance - could result in an exception being thrown, or incorrect data being stored.


Collection framework in java?

Collection framework is a framework in java that helps us handle multiple java objects in one shot. For example if you have an employee validation system where you have details about all the employees in an office, you will have lets say 1000 employee objects available in an ArrayList which we can iterate and check if every employee that is going through the door is a valid employee. Some of the collections we can use are: a. ArrayList b. Vector c. HashMap d. HashSet e. etc

Related Questions

Main difference between Array List and Vector in Java?

List is not sync'd as a vector is.


What are the requirements to download a java arraylist?

The requirements to download a java arraylist are a pc with java software installed. A java arraylist is used to store a group of elements in a specific order.


What type of platform does Arraylist Java run on?

Arraylist Java runs on Oracle which is a relational data management database produced by the Oracle Corporation. Arraylist Java has been part of the Java framework ever since Java 5.


How can you create array of an object in java?

Array's can hold only primitive data types. if you want a collection of objects you must use an ArrayList or a Vector.


How many number of objects we can store in an ArrayList. Is there any limit?

No. there is actually no such limit in any of the collections in java. The arraylist and vector are the most commonly used collections and they take thousands of objects. I have personally used them with atleast a 100,000 thousand objects.


What does it mean that a vector is synchronized in Java?

It means that multiple threads can safely read/modify data from a vector at the same time. Attempting to do that with an unsynchronized data type - an ArrayList, for instance - could result in an exception being thrown, or incorrect data being stored.


Collection framework in java?

Collection framework is a framework in java that helps us handle multiple java objects in one shot. For example if you have an employee validation system where you have details about all the employees in an office, you will have lets say 1000 employee objects available in an ArrayList which we can iterate and check if every employee that is going through the door is a valid employee. Some of the collections we can use are: a. ArrayList b. Vector c. HashMap d. HashSet e. etc


Use of java.util package?

The java.util package contains many useful utilities provided by the Java programming language. They include:Collections - ArrayList, Vector, HashMap etcEvent modelsDate & time featuresString tokenizerRandom number generatoretc.


How can you sort an arraylist of strings?

You can sort an ArrayList by using the sort method of the Collecions class (java.util.Collections). Assuming you have an ArrayList called foo: Collections.sort(foo);


What is subclasses in java?

Subclasses are classes that inherit from parent classes. i.e. ArrayList is a subclass of List.


What is difference between java 2 and java 5?

They are different versions. Java 5 is newer than Java 2. Think of it like the difference between the Playstation 1 and the Playstation 3.


How you can store a class variables in array list?

An (non generic) arrayList in java can save any type of object (in this case your class variable) in this straightforward way: MyClass myClassVar = new MyClass(); ArrayList myArrayList = new ArrayList(); myArrayList.add(myClassVar);