Online Java Compiler By
JavaTpoint.com
import java.util.Set; import java.util.concurrent.*; class ConcurrentHashMapnewKeySetExample2 { public static void main(String[] args) { Set
hashmap = ConcurrentHashMap.newKeySet(6); hashmap.add("AA"); hashmap.add("BBB"); hashmap.add("CCC"); hashmap.add("DDD"); System.out.println(" Mappings : "+ hashmap); System.out.println(" Mapping size : "+ hashmap.size()); } }
Output