Skip to content
Advertisement

Tag: symbol-table

What is the purpose of placing a HashSet inside of a HashMap?

For example: private HashMap<Integer, HashSet> variableName; I understand that HashMap implements Map and doesn’t allow duplicate keys and HashSet implements Set and doesn’t allow for duplicate values, but what is the purpose of placing a HashSet inside of a HashMap? Do they not achieve similar tasks by themselves (though in different ways and with different performance)? What functionality does doing

Advertisement