I have a HashTable
of Stack
objects:
Hashtable<String, Stack<Integer>> ht;
I want the data structure to be something like this:
"foo" => [3,6,12]
"bar" => [5,8,1]
"foo"
and "bar"
are keys and the two [x,y,z]
s are the stacks.
How do I do something like push an Integer
onto the stack in the hash table with key "a"
?
Many thanks.