HashMap<Integer, String> hashMap = new HashMap<>(); // Create HashMap
hashMap.put(1, "one"); // Put 1 as "one" in HashMap.
hashMap.put(2, "two"); // Put 2 as "two" in HashMap.
System.out.println("Contain 1: " + hashMap.containKey(1)); // Return true.
System.out.println("Contain 2: " + hashMap.containKey(2)); // Return true.
System.out.println("Contain 3: " + hashMap.containKey(3)); // Return false.