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 heap memory?
0 Answers Tavant Technologies, Zensar,
class A { public void disp(int a,int b) { System.out.println("hai"); } } class B { public void disp(int a,int b,int c) { System.out.println("hai"); } } above program is overloading or overriding?
What does t in java mean?
What are the different types of constructor?
How do constructors use this() and super()?
Explain Event handling in AWT?
Adapter classes?
What is integer valueof?
Can a serialized object be transferred via network?
What is unicode used for?
What is the use of Getters and Setters method ?
What are the standards to place package statement within a source code file?