How can I go through the values of a HashMap through a given key?
An example to illustrate: I have a HashMap named values, with a key that is an id represented by String and a value that is an integer.
HashMap<String, Integer> valores = new HashMap<String,Integer>();
valores.put("Id01",13);
valores.put("Id02",4);
valores.put("Id01",37);
valores.put("Id01",49);
valores.put("Id02",9);
valores.put("Id01",78);
valores.put("Id03",5);
valores.put("Id01",90);
How do I, for example, loop / for to cycle through the HashMap and print all the HashMap values belonging to the "Id01" key? Generating the following result on console:
13
37
49
78
90