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 restrictions imposed on method overriding?
What is the difference between the size and capacity of a vector?
What is split return?
what is the difference between HashMap And HashTable?
My application URL : http://localhost:8080/Application/Login.jsp. When a user enter this url in IE then, how it get Login.JSP Page exactly? what are the processes will happen from when we submit the URL to get Login.jsp?
What is polymorphism in java? What are the kinds of polymorphism?
What is the difference between equals() and == in java?
What is final, finally, finalize?
What does it mean that a method or field is “static”?
What is the exact difference in between Unicast and Multicast object ?
Why are variables important in research?
Can we access the non-final local variable, inside the local inner class?