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 the methods of an object class?
What is the benefit of lambda expressions?
why the equals method can be override?when we override the equals method?
Is jdk required on each machine to run a java program?
Can we restart a thread already started in java?
I need to know about complete topic in java's collections i with an examples
What are the different types of garbage collectors in java?
What is defined as false sharing in the context of multithreading?
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
Explain the term virtual machine?
How do you detect memory leaks?
How to count occurrences of each duplicate element in a list {a,b,d,c,a,b} ? Thanks in Advance