LogiQuest
Back to Objects and Collections
3

What is the output of the following program?

public class Main {
    public static void main(String[] args) {
        java.util.Map<String, Integer> m = new java.util.TreeMap<>();
        m.put("b", 2); m.put("a", 1); m.put("b", 5);
        System.out.println(m);
    }
}
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.