Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
    }
}