Map<String, String> map = new HashMap<String, String>(); // Make an empty map
map.put("es", "Spain"); // Add the key/value pairs
map.put("us", "United States");
map.put("zw", "Zimbabwe");
import java.util.*;
public HashMap{
public static void main(String[] args){
Map<Integer, String> map = new HashMap<>();//initialization of HashMap
map.put(key, value);//key and value must be entered
System.out.println(map);
}
}