import java.util.HashMap;
public class HashMapDemo {
public static void main(String[] args) {
//Creating HashMap;
HashMap<Integer, String> hm = new HashMap<>();
//Putting element
hm.put(1, "Naidu");
hm.put(3, "Rohilla");
hm.put(5, "Vijay");
hm.put(2, "Rahul");
hm.put(4, "Ramakesh");
//adding duplicate Value
//this will replace the element;
//can't store duplicate Values;
hm.put(5, "Sudeep");
//Storing null value
hm.put(null, null);
System.out.println("Iterating HashMap...");
System.out.println(hm);
}
}