HashMap和HashTable的区别 HashTable是synchronized的,是线程安全的,但HashMap是线程不安全的,但HashMap速度比HashTable块,HashMap是可以键值为null的,但HashTable不可以。