Menu
Question Index
...

What will be the output of the following program?

import java.util.*;
public class Names {
    public static void main(String args[]) {
        NavigableMap name = new TreeMap();
        name.put(1, "Bhavya");
        name.put(2, "Kavya");
        name.put(5, "Navya");
        name.put(7, "Divya");
        name.put(9, "Udaya");
        System.out.println(name.ceilingEntry(name.keySet()));
    }
}


Bhavya
Udaya
Compilation Error
Runtime Error

Doubts

Problems

Topic: TreeMap In Java - java.util.TreeMap

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App