Re: What is difference between ArrayList and Vector?
Posted By:
vinay_shukl
Posted On:
Wednesday, August 11, 2004 03:26 AM
arraylist is pure collection class but vector is a legacy class
vector is thread safe but arraylist is not. it means vector is syncronized
Re: What is difference between ArrayList and Vector?
Posted By:
veppadai_satheesh
Posted On:
Monday, July 26, 2004 12:51 AM
Vector is Synchronized but arrylist is not.vector is legacy class but fully compatible to current version.
we can also get synchronised arraylist by using the Algorithms
Re: What is difference between ArrayList and Vector?
Posted By:
Abhishek_Singh
Posted On:
Monday, July 19, 2004 04:45 AM
arraylist is use to create a memory space for cosecutive locations while vector can be used to increase the size of an array at run time.
Re: What is difference between ArrayList and Vector?
Posted By:
Zubair_Saiyed
Posted On:
Thursday, June 24, 2004 02:51 AM
Apart From Being synchronized, Vector Differ From
ArrayList in Way of Expanding itself.
As User can specify expansion percentage (Capacity Threshold) in Vector Which is not in ArrayList.
If Vector is created with following statement,
Vector v = new Vector ();
Then
Default Value of Vectors Size is 10 and Capacity Threshold is ZERO.
Let Assume that Vector v is having all 10 place used,
addition of one more element will cause it to Expand,
Expansion Criteria in Vector is
newCapacity = ( CapacityThreshold > 0) ?
(oldCapacity + capacityIncrement) : (oldCapacity * 2);
So it will double the Size of its Own if CapacityThreshold is not specified !!
Now Lets See Case of ArrayList,
It Doesnt have any Capacity Threshold Parameter.
Expansion in Case of ArrayList is
newCapacity = (oldCapacity * 3)/2 + 1;
Means it will expand 60% of its Size !
Re: What is difference between ArrayList and Vector?
Posted By:
manjith_kumar
Posted On:
Friday, June 4, 2004 09:29 AM
vector does not accept primitives and it is dynamic whereas
arraylist is static