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
How many types of flags are there?
What is hash table in java?
What is a string what operation can be performed out with the help of a string?
Are arrays immutable in java?
Can we make the abstract methods static in java?
What sorting algorithm does javascript use?
How many bits is a word?
Is it possible to compare various strings with the help of == operator?
What is meant by the value of a variable?
What is the lifetime and scope of a variable?
what is the difference between process and thread? : Java thread
What is the collections api in java programming?
Can a boolean be null java?
What is the use of parseint in java?
Write a function to print Fibonacci series and Tribonacci series?