1import java.util.TreeMap;
2public class TreeMapGetObjectMethodExample
3{
4 public static void main(String[] args)
5 {
6 TreeMap<Integer, String> tm = new TreeMap<Integer, String>();
7 tm.put(2, "tejas");
8 tm.put(1, "om");
9 tm.put(3, "tarun");
10 tm.put(6, "siddarth");
11 tm.put(5, "fanindra");
12 System.out.println("Check value of key 5: ");
13 System.out.println("Value is: " + tm.get(5));
14 }
15}