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

What is the use of parseint in java?

968


Why Java doesn’t support multiple inheritance?

990


Explain the significance of class loaders in bootstrap?

893


Can list have duplicates in java?

864


What does += mean in java?

1021


Which non-unicode letter characters may be used as the first character of an identifier?

963


What are 3 boolean operators?

944


What is a short in java?

967


What is nullpointerexception?

986


What mechanism does java use for memory management?

921


What's the base class of all exception classes?

1015


What is static keyword?

1053


Explain static nested classes ?

1046


How does remove work in java?

908


What is a boolean structure?

1036