HashMap源碼和併發異常問題分析

要點源碼分析 HashMap允許鍵值對爲null;HashTable則不允許,會報空指針異常; HashMap<String, String> map= new HashMap<>(2); map.put(null,null); map.put("1",null); HashMap初始容量是16,擴容方式爲2N: static final int D
相關文章
相關標籤/搜索