package devmanuals.com; import java.util.concurrent.ConcurrentNavigableMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.NavigableSet; public class CNMTailMap { public static void main (String args[]){ ConcurrentNavigableMap cnm, cnm1; NavigableSet ns; cnm= new ConcurrentSkipListMap(); cnm.put("A", "Rose"); cnm.put("B", "India"); cnm.put("C", "Network"); cnm.put("D", "Delhi"); System.out.println("Map = "+cnm); ns = cnm.keySet(); System.out.println("Set of keys = "+ns); System.out.println("Size of map = "+cnm.size()); //implementation of the method cnm1 = cnm.tailMap("B"); System.out.println("Tail map = "+cnm1); ns= cnm1.keySet(); System.out.println("Set of keys of tail map = "+ns); System.out.println("Size of tail map = "+cnm1.size()); } }