Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.*;

public class Main {
    public static <T> Integer changeValue(Map<T, Integer> map, T key, int value) {
        Integer integer = map.get(key);
        if (integer != null) {
            integer += value;
            map.put(key, integer);
        }

        return integer;
    }
}