1.HashMap非线程同步,HashTable线程同步。
2.HashMap允许<键,值>有空值,HashTable不允许<键,值>有空值。
3.HashMap使用Iterator,HashTable使用Enumeration。
4.HashMap中hash数组的默认大小是16,增长方式是2的指数倍,HashTable中hash数组的默认大小是11,增长方式是old*2+1。、
5.HashMap继承自AbstractMap类,HashTable继承于Dictionary类
1.HashMap非线程同步,HashTable线程同步。
2.HashMap允许<键,值>有空值,HashTable不允许<键,值>有空值。
3.HashMap使用Iterator,HashTable使用Enumeration。
4.HashMap中hash数组的默认大小是16,增长方式是2的指数倍,HashTable中hash数组的默认大小是11,增长方式是old*2+1。、
5.HashMap继承自AbstractMap类,HashTable继承于Dictionary类