HashMap的putIfAbsent()方法
public static void main(String[] args) {
HashMap<String, Object> hashMap = new HashMap<>();
Object obj = hashMap.putIfAbsent("A", null);
if (obj == null) {
System.out.println("Shit : NPE!");
}
hashMap.putIfAbsent("A",16)