I'm doing essentially what worked in the other exercises but is not working for some reason. I've tried this in multiple ways and it keeps coming up as a fail.
package com.codegym.task.task09.task0911;
import java.util.HashMap;
/*
Exception when working with Map collections
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
try {
HashMap<String, String> map = new HashMap<String, String>(null);
map.put(null, null);
map.remove(null);
}
//write your code here
catch (NullPointerException e) {
e.getClass();
System.out.println(e);
}
}
}