Hashtable:
1. Both key and value are not allowed to have null values
2. Using enumeration traversal
3. Synchronous, only one thread can access each time
4. Hashtable in Java is H uppercase, T lowercase, and HashMap is H uppercase, M uppercase
HASHMAP:
1. Key and value can have null values
2. Using iterator traversal
3. unsynchronized, multi- threaded occasions to manually synchronize HashMap
HashSet
1. Underlying call HashMap
2. Duplicate values are not allowed
Common Java Operations:
1Hashtable<integer, integer> ht=NewHashtable<integer, integer>();2 ht.put (key, value);3 Ht.containskey (key);4 Ht.containsvalue (value);5 Ht.remove (key);6 ht.remove (key, value);7 8Hashmap<integer, integer> HM =NewHashmap<integer, integer>();9 hm.put (key, value);Ten Hm.containskey (key); One Hm.containsvalue (value); A Hm.remove (key); - hm.remove (key, value); - thehashset<integer> HS =NewHashset<integer>(); - Hs.add (e); - hs.contains (o); -Hs.remove (o);
Reference:
Http://www.cnblogs.com/springfor/p/3859628.html
Http://blog.sina.com.cn/s/blog_4586764e0100ivup.html
Http://www.blogjava.net/fisher/archive/2006/12/13/87398.html
http://blog.csdn.net/wl_ldy/article/details/5941770
http://www.pakzilla.com/2009/08/24/hashmap-vs-hashtable-vs-hashset/
HashTable HashMap hashset Difference (Java) [from the Love to cook small Jade]