Java tutorial
//package com.java2s; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; public class Main { public static <K, V> ConcurrentMap<K, V> newConcurrentMap() { return new ConcurrentHashMap<K, V>(); } public static <K, V> ConcurrentMap<K, V> newConcurrentMap(int initCap) { return new ConcurrentHashMap<K, V>(initCap); } }