How do you search for a key in a HashMap? In this program, when the user enters a key the code should arrange to search the hashmap for the corresponding value and
HashMap
Just call get:
HashMap map = new HashMap(); map.put("x", "y"); String value = map.get("x"); // value = "y"