package devmanuals.com; import java.util.concurrent.ConcurrentNavigableMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.NavigableSet; public class CNMTailMapBoolean { public static void main (String args[]){ ConcurrentNavigableMap cnm, cnm1; NavigableSet ns; cnm= new ConcurrentSkipListMap(); String str,str1,str2,str3; str="Rose"; str1="India"; str2="Network"; str3="Delhi"; cnm.put(1, str); cnm.put(2, str1); cnm.put(3, str2); cnm.put(4, str3); 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(2,true); 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()); } }