找工做——集合框架

HashMap和HashTable
都采用了hash法进行索引
HashMap容许键值为空(但只容许一条为空),而HashTable不容许。
HashMap是非线程安全的,而HashTable是线程安全的。
HashMap使用Iterator,HashTable使用Enumeration
hash值使用不一样,HashTable直接使用对象的hashCode。安全

相关文章
相关标签/搜索