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 are the methods of an object class?

3 Answers  


What is the benefit of lambda expressions?

0 Answers  


why the equals method can be override?when we override the equals method?

5 Answers  


Is jdk required on each machine to run a java program?

0 Answers  


Can we restart a thread already started in java?

0 Answers  






I need to know about complete topic in java's collections i with an examples

1 Answers   TCS,


What are the different types of garbage collectors in java?

0 Answers  


What is defined as false sharing in the context of multithreading?

0 Answers  


Java openings 3 - 5 years, Lnt Infotech. requirements - core java, J2ee, struts, hibernate Interview Date:- 19 March 2011 Time:- 9:00 AM to 12:00 Pm Interview Location - L & T Infotech, Manapakkam, Chennai Refererral PS NO:- 291649 (Please mention this when u fill the form only then u will be considered for interview) Documents Required:- Latest Resume, Photograph and last 3 payslips Mail me on vasan2211@gmail.com once u appear for interview

0 Answers   L&T,


Explain the term virtual machine?

0 Answers   Adobe,


How do you detect memory leaks?

0 Answers  


How to count occurrences of each duplicate element in a list {a,b,d,c,a,b} ? Thanks in Advance

2 Answers   TCS,


Categories