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 are batch updates. in jdbc
What is null object in java?
What are the features of java?
What is 16 bits called?
What are the advantages of inner classes?
What happens when heap memory is full?
Write a program in java to create a doubly linked list containing n nodes.
Can we have a abstract class withought any method? What is a purspose of this?
What is lambda programming?
How finally used under exception handling?
What are the important methods of java exception class?
What are the drawbacks for singleton class?