map .put code example
Example: map.put in java
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);
}
}