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 |
How do you check if two strings are equal in java?
Can a static block throw exception?
Is java type safe?
Why charat is used in java?
Can you explain the Java thread lifecycle?
What are the different types of garbage collectors in java?
What is the difference between a Window and a Frame?
Can you override a private or static method in java?
How many types of memory areas are allocated by jvm?
where can we get jAVA project orientation traing in HYDERABD
Is java still necessary?
What are keywords and reserved words in java?