1import java.util.*;
2public HashMap{
3 public static void main(String[] args){
4 Map<Integer, String> map = new HashMap<>();//initialization of HashMap
5 map.put(key, value);//key and value must be entered
6 System.out.println(map);
7 }
8}
1map.put(key, Object);
2//exemple:
3Map<String, String> map = new HashMap<String, String>();
4map.put("mykey", "myvalue");