Answer Posted / rice
HashMap is a class that implements Map interface.
HashMap underlined data structure is Hash table.
If we want to describe the group of objects as key ,value
pairs then we go for HashMap class.
key are not duplicated but value can be any thing.
null insertion is possible.
insertion order is not preserved.
HashMap hm=new HashMap();
hm.put(1, "rice");
hm.put(3, "rice");
hm.put(2, "shine");
System.out.println(hm);
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How can I protect myself? : java security
What do you understand by a variable?
program A and B are analysed and found to have worst case running time greater than 150NlogN and N*N respectively. which program has the better guarantee after the running time for the large values of N(N>10000)? which program has the better guarantee for the running time of small program N (N<100)? which program will run faster on average for N=1000?
What is a uint8?
What is jpa used for?
What is the difference between swing and awt components?
What is gui in java with examples?
What is a pojo class in java?
Does jvm maintain a cache by itself? Does the jvm allocate objects in heap? Is this the os heap or the heap maintained by the jvm? Why
How can you work with permissions from your .net application? : java security
What is the meaning of the words public, static and void?
Differences between intermediate operations and terminal operations of java 8’s stream api?
Why doesn’t the main method throw an error with no arguments?
What is dialect in java?
What is stateless class in java?