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 Java Annotations?
What for read() function?
Can we execute a program without main() method?
what are the major differences between jdk1.4 and jdk1.5?
2 Answers Cap Gemini, Crimson Logic, Infosys, TCS, Tenth Planet,
Why string is immutable or final in java
What are the similarities between an array and an ArrayList?
What is the difference between a break statement and a continue statement?
what is the use of bean managed and container managed with example?
Keywords in Exceptions?
How do you use substring in java?
To the class members how can we provide security?
How to display names of all components in a Container?