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

What if constructor is protected in java?

1201


What are the disadvantages of using inner classes?

1285


What are the different types of inner classes?

1079


What is meant by call by reference?

1089


What is the difference between length and length() method in java?

1173


What happens to the Exception object after handling an exception?

2430


How can we make string upper case or lower case?

1142


If an object reference is set to null, will the garbage collector immediately free the memory held by that object?

1201


What are the restrictions imposed by a Security Manager on Applets?.

2652


What restrictions are placed on method overriding in java programming?

1057


What is the SimpleTimeZone class?

2333


What is byte [] in java?

1075


Explain the difference between the public, private, final, protected, and default modifiers?

1097


Which method cannot be overridden in java?

1043


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

2232