Good afternoon people, I need to do some operations using HashMap. I'm new to the area.
I have the following map
protected Map<String, Map<String, Integer>> elementos = new HashMap<>();'
The first String is a key, the value is a map that contains a key as String and an Integer value.
I need to traverse all values that are in this hashmap, that is, all internal hashMaps. So I need to do comparisons and a sort. Example:
HashMap<"texto1",HashMap<"Cachorro", 3>
HashMap<"texto2",HashMap<"Peixe", 2>
There I would make a comparison of the type, "If" dog "==" Fish "-> Frequency listing = (3-2); Finally, somehow, after this calculation sort out saying which text comparison is less. First post here. Java '