Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.concurrent.ConcurrentHashMap;

public class Main {
    private static ConcurrentHashMap<String, String> publicDnsMap;

    public static synchronized ConcurrentHashMap<String, String> getMap() {
        if (publicDnsMap == null) {
            publicDnsMap = new ConcurrentHashMap<String, String>();
        }
        return publicDnsMap;
    }
}