标签:over get void col ash out throws sys exception
@Override public void run(String... args) throws Exception { ConcurrentHashMap<String, String> concurrentHashMap = new ConcurrentHashMap<>(); concurrentHashMap.put(null, "1");//npe concurrentHashMap.put("1", null);//npe concurrentHashMap.get(null);//npe HashMap<String, String> hashMap = new HashMap<>(); hashMap.put(null, "1");//ok hashMap.put("1", null);//ok System.out.println(hashMap.get(null));//"1" System.out.println(hashMap.get("1"));//null }
标签:over get void col ash out throws sys exception
原文地址:https://www.cnblogs.com/Brake/p/12806724.html