Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicLong;

public class Main {

    public static void addLong(ConcurrentMap<String, AtomicLong> map, String key, long delta) {
        map.putIfAbsent(key, new AtomicLong(0));
        map.get(key).getAndAdd(delta);
    }
}