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 many types of jdk are there?
What is injection in java?
What if the main method is declared as private?
How do I export a java project?
What is the use of rs next () in java?
How do you find lambda?
What is the locale class?
What do you mean by exception handling?
I have deployed a .war file in my application server comprising of struts and hibernate.If i want to change the "dialect" property of hibernate cfg file how can i change(I have only .war file)... Thanks in advance
What are jpa annotations?
What are orm tools in java?
What is singleton pattern in java?
Do I really have to type in the programs in the book to try them out?
What is type_scroll_insensitive in java?
What if I write static public void instead of public static void?