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