public class TestMap2 { public static void main(String[] args) { HashMap M = new HashMap(); Integer r; Iterable it1; r = M.put("A", 124); System.out.println(M); r = M.put("B", 243); System.out.println(M); r = M.put("C", 273); System.out.println(M); r = M.put("D", 172); System.out.println(M); r = M.put("E", 111); System.out.println(M); System.out.print("Map after 5 insertions >> "); System.out.println(M); System.out.println(); r = M.get("D"); System.out.println("key = D , value = " + r); System.out.println(); it1 = M.keySet(); System.out.println("keySet():"); System.out.println(it1); System.out.println(); M.remove("D"); System.out.print("After delete `D'>> "); System.out.println(M); System.out.println(); } }