Get Synchronized Map from TreeMap - Java Collection Framework

Java examples for Collection Framework:TreeMap

Description

Get Synchronized Map from TreeMap

Demo Code


import java.util.TreeMap;
import java.util.Collections;
import java.util.Map;
 
public class Main {
 
  public static void main(String[] args) {
    TreeMap treeMap = new TreeMap();
    Map map = Collections.synchronizedMap(treeMap);
  }//from w  w w.j  av a 2  s  .c  om
}

Related Tutorials