when to use ArrayList and when to use HashMap in
webApplication.
Answer / 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 |
What is difference between hash mapping and hash table?
What is meant by flickering?
java program with complete 4 oops concepts implemented example
Is Java a dying language?
Is assembly language a low level language?
How is final different from finally and finalize?
What happens when I use / and % with a negative numerator?
Does list maintain insertion order java?
What is the difference between an object-oriented programming language and object-based programming language?
Explain Basics of OOP Language in java
Why sleep()is in Thread and wait() in Object class? Why can't I have both in one class or vice versa?
How to make a non daemon thread as daemon?