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
Describe life cycle of thread?
Is jar an executable?
What is the java virtual machine (jvm)?
What is entitymanager in jpa?
Is openjdk the same as jdk?
Do I need jdk or jre?
Differences between intermediate operations and terminal operations of java 8’s stream api?
How does jpa repository work?
What does persist mean in java?
What are jpa annotations?
What happens when you omit a brace or misspell one of the words, like public or
What is the difference between ec2 and lambda?
What is xml file in java?
What are anonymous methods and lambda expression?
What are the rules regarding quotation marks?