Hello there, I am looking for help with HashMaps.
I got the following code for initializing a HashMap (which is for a language recognizing program). The first HashMap contains the language as key (
String), and another hashmap as value. The second hashmap has the letters (in ASCII) as key, and a Vector as value. The Vector will hold the amount of occurences of each letter. I am asking if this is the correct way to initialize it:
And is this the correct way of adding new languages and accessing the components in that kind of HashMap structure?
Also I'd like to ask if there are any alternative ways of achieving the same kind of linked structure?
Cheers,
Michael