answersLogoWhite

0


Best Answer

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

โˆ™ 2010-03-02 16:58:29
This answer is:
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
User Avatar

Add your answer:

Earn +20 pts
Q: What is difference between ArrayList and Vector?
Write your answer...
Submit
Related questions

How can you convert ArrayList to Vector?

Both of these types of Collections allow for a new instance to be created with the contents of another Collection. // This method will accept a Vector and return a new ArrayList which contains all elements of that Vector static ArrayList toArrayList(Vector v) { return new ArrayList(v); } // This method will accept an ArrayList and return a new Vector which contains all elements of that ArrayList static Vector toArrayList(ArrayList al) { return new Vector(al); }


What is the difference between arrayList and vector in java?

In use they're almost identical. The only thing you, as the programmer, really need to know is that Vectors are thread-safe and ArrayLists are not.


Difference between pipelining and vector processing?

Difference between pipelining and vector processing?


What is difference ArrayList and Vector?

ArrayListThink of this as a growable array. It gives you fast iteration and fast random access. To state the obvious: it is an ordered collection (by index), but not sorted. You might want to know that as of version 1.4, ArrayList now implements the new RandomAccess interface-a marker interface (meaning it has no methods) that says, "this list supports fast (generally constant time) random access." Choose this over a LinkedList when you need fast iteration but aren't as likely to be doing a lot of insertion and deletion.VectorVector is a holdover from the earliest days of Java; Vector and Hashtable were the two original collections, the rest were added with Java 2 versions 1.2 and 1.4. A Vector is basically the same as an ArrayList, but Vector methods are synchronized for thread safety. You'll normally want to use ArrayList instead of Vector because the synchronized methods add a performance hit you might not need. And if you do need thread safety, there are utility methods in class Collections that can help. Vector is the only class other than ArrayList to implement RandomAccess.The only difference between the two is that Vectors are synchronized and hence threadsafe whereas ArrayLists are not. Otherwise they are both identical in terms of their features and usage.


What is difference between ArrayList and LinkedList?

ArrayListLinkedList1. ArrayList uses a dynamic array.1..Linked List uses doubly linked list.2. ArrayList is not efficient for manipulation because a lot of shifting is required.2.. LinkedList is efficient for manipulation


What is the difference between superclass and subclass in java?

The superclass is the class from which the current class inherits.The subclass is the class which inherits from the current class.class ArrayList extends AbstractList {}Here AbstractList is the superclass of ArrayList and ArrayList is the subclass of AbstractList.


What is the difference between an initial point of a vector and a terminal point?

The difference is the length of the vector.


What is the difference between zero vector and null vector?

They are the same.


What is vector and arraylist in collections of java?

ArrayListThink of this as a growable array. It gives you fast iteration and fast random access. To state the obvious: it is an ordered collection (by index), but not sorted. You might want to know that as of version 1.4, ArrayList now implements the new RandomAccess interface-a marker interface (meaning it has no methods) that says, "this list supports fast (generally constant time) random access." Choose this over a LinkedList when you need fast iteration but aren't as likely to be doing a lot of insertion and deletion.VectorVector is a holdover from the earliest days of Java; Vector and Hashtable were the two original collections, the rest were added with Java 2 versions 1.2 and 1.4. A Vector is basically the same as an ArrayList, but Vector methods are synchronized for thread safety. You'll normally want to use ArrayList instead of Vector because the synchronized methods add a performance hit you might not need. And if you do need thread safety, there are utility methods in class Collections that can help. Vector is the only class other than ArrayList to implement RandomAccess.


What is difference in resultant vector and vector resolution?

the difference between resultant vector and resolution of vector is that the addition of two or more vectors can be represented by a single vector which is termed as a resultant vector. And the decomposition of a vector into its components is called resolution of vectors.


Difference between a queue and a Linked list?

from the abstraction: list you go to the implementation details (concrete): arraylist,vector or linkedlist,circularlinkedlist and maybe more when somebody asks you for a special list in this case (queue) speciality 1 enqueue -add to botton speciality 2 dequeue - remove from top you are free to pick up arraylist,and/or linkedlist and/or circularlists and/or vector to implement your new specialized list called queue. and/or means you might want to combine as well


Difference between arraylist and array?

Arraylist provide a lot of functionalities over array .Array have fixed size and can not increase dynamically if there is need during of execution . But in case of arraylist it can increase their size if needed .So we can say array is fixed in size and arraylist is dynamic or re sizable array .Second , arraylist provide a lot of predefined method for different functionalities so it make developer work easy because these method well efficient.


Is Linear Momentum a Vector?

Yes. That is the chief reason for the difference between momentum (a vector) and kinetic energy (not a vector).


Main difference between Array List and Vector in Java?

List is not sync'd as a vector is.


What is the difference between scalar and vector drives?

a vector drive is vertical, a scalar is horizontal.


What is the difference between a vector and a parasite?

vector is usually is the arthropodes carrying the parasites such as mosquitoes.


What is the difference between vector and phaser diagram?

vagina


What is the difference between a vector and a carrier?

A vector carries the disease but doesn't show any symptoms.


What is the difference between space vector modulation and pulse width modulation?

There is no difference.


What is the difference between resultant and equilibrant vector?

Equilibrant vector is the opposite of resultant vector, they act in opposite directions to balance each other.


The main difference between a scalar and a vector quantity is?

Direction


What is the difference between 9 5 linear and vector?

86


What is the difference between an array and a vector in java?

An array has a fixed size, whereas the vector can grow in size as necessary.


What is the difference between a carrier and a vector?

carrier harbour a pathogen but vector itself does not harbour the pathogen itself


Difference between scaler processors and vector processors?

One difference between scalar processors and vector processors is their startup times, with vector processors needing prolonged startup due to multiple tasks. Another difference is that scalar processors operate on only one point of data at a time.