What will be the output of the following code?
import java.util.*;
public class Test {
public static void main(String[] args) {
Map<String, Integer> map = new HashMap<>();
map.put("X", 100);
map.put("Y", 200);
map.put(null, 300);
System.out.println(map.get(null));
}
}
300
null
Compilation Error
Runtime Exception
This question is part of this quiz :
Java Queue and Map Interface