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