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
If you’re overriding the method equals() of an object, which other method you might also consider?
differences between iterator and spliterator in java se 8?
What is loose coupling in java?
What does @override mean in java?
I get an exception if I remove the static modifier from main?
Is it better to learn java or python?
Why do we need new date and time api in java se 8?
What are the benefits of a jar file?
What is javax annotation generated?
What are tags in java?
What is an actionevent in java?
Which version of jdk is required for netbeans 8.0 2?
What is javacpl?
How can you work with permissions from your .net application? : java security
What is jsr in java?