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 blank final variable?
What is difference between final and immutable?
Is string a class in java?
Why vector is used in java?
What is the difference between equals() and?
Define "Access specifiers" in java.
What kind of variables can a class consist?
why we are calling j2se why not j1se or j3se or j4se..etc is there any reason.. can u please explain it... i shocked in my interview when they asked this question please explain ans
Is array synchronized in java?
Explain java code for recursive solution's base case?
Hi friends, i am new to java. can you explain how java is secured.
What are passing parameters?