public class HashMapMy extends HashMap { HashMap<String, Integer> map = new HashMap<String, Integer>(); public HashMapMy{ map.put("A", 1); map.put("B", 2); } }
public class HashMapOf { public static HashMap<String, Integer> pukeName = new HashMap<String, Integer>(){{ put("A", 1); put("B", 2); }}; }