123456789101112131415



Question 1: What is the output of the following program ?
import java.util.HashMap;
import java.util.Map;
public class MapTest {
public static void main(String aga[]){
Map m= new HashMap();
m.put(null, "Test");
m.put(null,"Fest");
System.out.println(m);
}
}

1. {null=Fest}
2. {null=Test}
3. Compilation error at 7 and 8
4. Compilation error at 8 , about can´t override the value "Test"