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
Differences between intermediate operations and terminal operations of java 8’s stream api?
How long can a lambda function run?
What is a context in java?
What is microservices java?
What is meant by annotation in java?
What are messages in java?
What is interceptors in java?
What is custom tag in java?
What is mime in java?
What is flatmap in java8?
What is stateless object in java?
Describe life cycle of thread?
What does jpa mean?
What is meant by framework in java?
What's the difference between local, global and universal groups? : java security