Java tutorial
import java.util.SortedMap; import java.util.TreeMap; public class Main { public static void main(String[] args) { TreeMap<Integer, String> db = new TreeMap<Integer, String>(); db.put(1000, "1000"); db.put(1011, "1011"); db.put(1102, "1102"); db.put(2023, "2023"); db.put(2034, "2034"); TreeMap<Integer, String> db2 = new TreeMap<Integer, String>(db); System.out.println(db2); } }