Online Java Compiler By
JavaTpoint.com
import java.util.*; public class CollectionsSynchronizedMapExample1 { public static void main(String[] args) { Map
map = new HashMap
(); map.put("1", "Rahul"); map.put("4", "Karan"); map.put("3", "Mohan"); Map
synmap = Collections.synchronizedMap(map); System.out.println("Synchronized map is :" + synmap); } }
Output