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 use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent
Why can't we make a class private in java?
What is a function argument in java?
What is the protocol is used in type4 driver?
What is difference between hashset and hashmap?
What happens if an exception is throws from an object's destructor?
Is Constructor possible in abstract class in java ?
Can we force garbage collector to run ?
What is sortedset in java?
What are concepts of OOPS and how are they implemented in Java?
what is the difference between statis block and static variable
What is api in java?