1. HashMap是线程不安全的,HashTable是线程安全的;
2. HashMap中允许键和值为null,HashTable不允许;
3. HashMap的默认容器是16,为2倍扩容,HashTable默认是11,为2倍+1扩容;