Answers for "how to sum the values of a hashmap"

1

how to sum the values of a hashmap

float sum = 0.0f;
for (float f : map.values()) {
    sum += f;
}
Posted by: Guest on July-22-2020

Code answers related to "how to sum the values of a hashmap"

Browse Popular Code Answers by Language