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
what is the package for freshers in valuelabs.
What is a yaml file in java?
What is native api in java?
What is meant by pass by reference and pass by value in java?
What is stateless class in java?
Is java installed on windows 10?
What is mq in java?
What are tags in java?
How do I run a project in netbeans?
What is log4j in java?
What happens if javac is not recognized?
How do you run an executable jar file?
What is type_scroll_insensitive in java?
What is the difference between ec2 and lambda?
Do I need jdk or jre?