HashMap<Integer,ArrayList> map = new HashMap<>();
ArrayList<Integer> list = new ArrayList<Integer>();
list.add(1);
map.put(1, list);
if(map.containsKey(1)) {
map.get(1).add(4);
}
System.out.println(map);
HashMap<Integer,ArrayList> map = new HashMap<>();
ArrayList<Integer> list = new ArrayList<Integer>();
list.add(1);
map.put(1, list);
if(map.containsKey(1)) {
map.get(1).add(4);
}
System.out.println(map);