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 are the main uses of java?
What are recursive functions? Give some examples?
0 Answers Axtria, ITC Indian Tobacco Company,
what are the differences between final,finally,finalize methods?
How can the checkbox class be used to create a radio button?
Is empty .java file name a valid source file name?
What is defined as false sharing in the context of multithreading?
Explain the scope or life time of class variables or static variables?
Explain about assignment statement?
Explain about the dynamic behavior of core java?
How do you use nextline in java?
How do you compare characters in java?
What is the difference between size and length in java?