package devmanuals.com; import java.util.concurrent.ConcurrentNavigableMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.NavigableSet; public class CNMNavigableKeySet { public static void main (String args[]){ ConcurrentNavigableMap cnm = new ConcurrentSkipListMap(); cnm.put(1,"Rose"); cnm.put(2,"India"); cnm.put(3,"Network"); cnm.put(4,"Delhi"); System.out.println("Mappings = "+cnm); System.out.println("Size of mappings = "+cnm.size()); NavigableSet ns = cnm.navigableKeySet(); System.out.println("Set of keys = "+ns); System.out.println("First entry of the map = "+cnm.firstEntry()); System.out.println("Last entry of the map = "+cnm.lastEntry()); } }