public static HashMap<ArrayList<Integer>, String> map = new HashMap<ArrayList<Integer>, String>();
public static ArrayList<ArrayList<Integer>> keys = new ArrayList<>(map.keySet());
Then in main
map.put(key, "c");
(assume key
is a valid ArrayList). But keys
still has size 0 after that.
How can I make the relationship of keys
stronger so that it will be actually tied to the HashMap and contain all its keys.