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



Hi Friends, Can u give few interview questions which relates ArrayList and Hashmap. I mean how to l..

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

Post New Answer

More Core Java Interview Questions

what is difference betweem home interface and remote interface?

0 Answers   CTS, HCL,


What is the full form of jpeg?

0 Answers  


how to handle http request in struts

2 Answers   Polaris,


Which method cannot be overridden in java?

0 Answers  


Can we extend private class in java?

0 Answers  






Difference between Primary key and unique key?

4 Answers  


Hi Friends, can you explain instance in java. In general instance means "occurence of something" . In java what is instance.

4 Answers  


What is anonymous inner class?

0 Answers  


what are the application of compiler and interpreter for source program

2 Answers  


How to implement Singleton

6 Answers   DELL,


Why does java have different data types for integers and floating-point values?

0 Answers  


Why is the type for real numbers called double?

0 Answers  


Categories