Hi Friends, Can u give few interview questions which relates
ArrayList and Hashmap. I mean how to link ArrayList and
HashMap.I know this is not good way of asking questions like
this , but i need
Answer / murali,25@gmail.com
HashMap stores key-value pairs. Alternate approach is to have a plain java class with key,value as attributes.
class HashMapAlternate{
Object key;
Object value;
}
You can create objects of HashMapAlternate and store it in arraylist. But HashMap is a better solution because it uses hashing and collision resolution technique which speeds up lookup when number of objects are very large.
| Is This Answer Correct ? | 2 Yes | 0 No |
what is the major difference between linkedlist and arraylist in java?
How do I enable java in safari?
What is unicode?
Hi friends i want display Triangle shap stars(*) please can tell me any one java code logic? * *** ***** ******* Like this
What are the changes in java.io in java 8 ?
What are the states of thread in java?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
how to print output with out using sop statements
what is java
describe synchronization in respect to multithreading? : Java thread
What does || || mean in math?
Difference between operator overloading and function overloading
0 Answers Tavant Technologies, Virtusa,