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 difference between ArrayList and Vector

Answer Posted / m.sridhar

ArrayList and vector both are dynamically growing arrays.
ArrayList is not thread safe where as vector is thread safe.
vector is legacy class and ArrayList is newly added.
by default ArrayList capacity is 0 where as Vector intial
capacity is 10.
vector is growing by its size doubled.
ArrayList is increse by its size half(50%)

Is This Answer Correct ?    47 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a stack class in java ?

1152


What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?

1026


Does java support multiple inheritance or not?

1189


What is independent and dependent variables in research?

916


What is parseint?

1073


What is a null check?

1070


What is the main advantage of passing argument by reference?

1042


What is 32 bit float?

1059


Why java is said to be pass-by-value ?

1086


What is contract between hashcode and equal method?

1096


What is difference between == equals () and compareto () method?

1096


Can an interface have a class?

1043


Explain the importance of throwable class and its methods?

1090


What do you mean by a JVM?

1352


What is the purpose of checked and unchecked exceptions in JAVA?

1066