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 setLong(ConcurrentMap<String, AtomicLong> map, String key, long newValue) {
        map.putIfAbsent(key, new AtomicLong(0));
        map.get(key).getAndSet(newValue);
    }
}