Online Java Compiler By
JavaTpoint.com
import java.util.*; public class CollectionsCheckedNavigableMapExample1 { public static void main(String[] args) { NavigableMap
hmap = new TreeMap<>(); //Insert values in the Map hmap.put("A", 11); hmap.put("B", 12); hmap.put("C", 13); hmap.put("V", 14); //Create type safe view of the Map System.out.println("Type safe view of the Navigable Map is: "+Collections.checkedNavigableMap(hmap,String.class,Integer.class)); } }
Output