Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the diff b/w arraylist and vector?

Answer Posted / umanath

Vector and ArrayList are very similar. Both of them
represent a 'growable array',
ArrayList it's part of the Java Collection Framework, and
has been added with version 1.2, Vector it's an object that
is present since the first version of the JDK.
The main difference is that Vector it's a synchronized
object, while ArrayList it's not.
While the iterator that are returned by both classes are
fail-fast (they cleanly thrown a
ConcurrentModificationException when the original object has
been modified), the Enumeration returned by Vector are not.

Unless you have strong reason to use a Vector, the
suggestion is to use the ArrayList.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the select method with an example?

1171


Can we access instance variables within static methods ?

1085


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

976


Write a code to create a trigger to call a stored procedure

971


What is an exception? difference between Checked and Unchecked exception in Java

1011


Can we override private method in java?

1082


What is a data structure java?

992


What is array length?

966


What is the exact difference in between Unicast and Multicast object?

2114


What is re-factoring in software?

1048


Why java is not 100% object-oriented?

1496


How are java objects passed to a method and what are native methods?

1071


What is this () in java?

1017


What is the difference between delete and delete[]

1527


What is byte code and why is it important to java’s use for internet programming?

1121