[Solved] Java – Unable to access a HashMap within a HashMap
I’m not sure that I really understand your description of what you are doing, but this stands out: this.containers.put(this.currentHashMapKey, tempHashMap); // … tempHashMap.clear(); When you call clear(), you remove all entries from tempHashMap. Since this is the map object that you added as a value in the containers map, you are clearing it there as … Read more