HashMap是非线程安全的,Hashtable是线程安全的
HashMap的键值都可以是Null,Hashtable的键值不可是Null
HashMap继承自AbstractMap类 ,Hashtable继承Dictiona类
ps:Properties继承自Hashtable类
扫描二维码关注公众号,回复:
185453 查看本文章
HashMap是非线程安全的,Hashtable是线程安全的
HashMap的键值都可以是Null,Hashtable的键值不可是Null
HashMap继承自AbstractMap类 ,Hashtable继承Dictiona类
ps:Properties继承自Hashtable类