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 will you load a specific locale?
What is "this" keyword in java? Explain
What is the basic of java?
What happens when a thrown exception is not handled?
What are the types of collections in java?
Is there a sort function in java?
what is interface in java? Explain
What is a condition in programming?
What is the purpose of tostring() method in java?
What is a dynamic array java?
What is jit and its use?
What is lossy conversion in java?
How do you sing an Applet ?
Is null function in java?
Is nan false?