We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b625c3d commit eba95e7Copy full SHA for eba95e7
contents/differences-between-hashmap-and-hashtable.md
@@ -8,7 +8,7 @@
8
2. `Hashtable`不允许有空的键或值。`HashMap`允许空键和空值。
9
3. HashMap有一个子类[LinkedHashMap](http://docs.oracle.com/javase/7/docs/api/java/util/LinkedHashMap.html),对这个类对象进行迭代时,它的顺序是有序的(按插入顺序排序)。如有需要,你也能轻易的从`LinkedHashMap`转化成`HashMap`。`Hashtable`就没那么简单了,
10
11
-总之,如果你无需关心同步(synchronized)问题,我会建议用`HashMap`。反之,你可以参考[ConcurrentHashMap](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentHashMap.html)
+总之,如果你无需关心同步(synchronized)问题,我会建议用`HashMap`。反之,你可以考虑使用[ConcurrentHashMap](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ConcurrentHashMap.html)
12
13
### stackoverflow链接:
14
http://stackoverflow.com/questions/40471/differences-between-hashmap-and-hashtable
0 commit comments