package devmanuals.com; import java.util.concurrent.ConcurrentNavigableMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.NavigableSet; public class CNMKeySet { public static void main (String args[]){ ConcurrentNavigableMap cnm = new ConcurrentSkipListMap(); cnm.put(1,"A"); cnm.put(2,"B"); cnm.put(3,"C"); cnm.put(4,"D"); System.out.println("Mappings = "+cnm); System.out.println("Size of mappings = "+cnm.size()); NavigableSet ns = cnm.keySet(); 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()); } }