Java examples for Collection Framework:HashMap
Get Synchronized Map from HashMap
import java.util.HashMap; import java.util.Collections; import java.util.Map; public class Main { public static void main(String[] args) { HashMap hashMap = new HashMap(); /*from w w w .ja v a 2 s. c o m*/ Map map = Collections.synchronizedMap(hashMap); System.out.println("done"); } }