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 the difference between a choice and a list?
What is parsing a sentence?
To the class members how can we provide security?
What are the steps in the jdbc connection?
Differentiate between stringbuffer and stringbuilder in java.
Explain the use of sublass in a java program?
Write a method that will remove given character from the string?
Can an unreachable object become reachable again?
Does java support multi dimensional arrays ?
What are the types of arrays in java?
Matrix multiplication only using OOP concepts .
Why synchronization is important in java?