sum values left in a hashmap code example Example: how to sum the values of a hashmap float sum = 0.0f; for (float f : map.values()) { sum += f; }