Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Collections; import java.util.HashSet; import java.util.Set; public class Main { final static public int INITIAL_CAPACITY = 20; final static public Set<Object> synchronizedSet() { return Collections.synchronizedSet(new HashSet<Object>(INITIAL_CAPACITY)); } }