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 |
Why null interfaces are used in Java?
Explain when noclassdeffounderror will be raised ?
What is a method in coding?
What is jit compiler in java?
What is the difference between choice and list?
which method throws exception of type Throwable
Differences between external iteration and internal iteration?
What is an class?
what is the purpose of using rmisecuritymanager in rmi?
How does compareto work in java?
What is the significance of continue jump statement? Explain with an example.
What is java autoboxing?