Java tutorial
//package com.java2s; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; public class Main { public static int sumIntegerValueInMap(Map<String, Integer> pMap) { Iterator<Entry<String, Integer>> cIte = pMap.entrySet().iterator(); int vTotalSum = 0; while (cIte.hasNext()) { vTotalSum += cIte.next().getValue(); } return vTotalSum; } }