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...

when to use ArrayList and when to use HashMap in
webApplication.

Answer Posted / naseer

When you want to retrieve use ArrayList
Dont use ArrayList if the frequent operation is insertion
and deletion instead use LinkedList.

Use HashMap if you want to store interms of Key and Value
pair .
Don’t use a HashMap unless you need the lookup feature. It
takes more time to build a HashMap than an ArrayList.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you override a private method in java?

925


What is an image buffer?

918


Explain the difference between private, public, package and protected in java?

989


Write a factorial program using recursion in java?

940


what are different ways in which a thread can enter the waiting state? : Java thread

902


Does treeset allow null in java?

906


what is the difference between preemptive scheduling and time slicing? : Java thread

973


Define interface in java?

1022


What is the difference between abstraction and encapsulation?

999


What is boolean keyword in java?

1069


Explain 5 features introduced in jdk 1.7?

965


Where pragma is used?

989


Is java a compiler?

916


What is the benefit of using enum to declare a constant?

1036


Give example to differentiate between call by value and call by reference.

968