1 access to the Hashtable is synchronized on the table while access to the HashMap isn't
2 HashMap is fail-safe while the enumerator for the Hashtable isn't
3 HashMap permits null values in it, while Hashtable doesn't
2 HashMap is fail-safe while the enumerator for the Hashtable isn't
3 HashMap permits null values in it, while Hashtable doesn't
博客主要对比了HashMap与Hashtable的差异。访问时,Hashtable在表上同步,而HashMap不同步;枚举时,HashMap是安全失败的,Hashtable则不是;存储方面,HashMap允许null值,Hashtable不允许。
1560

被折叠的 条评论
为什么被折叠?



