The difference between 1.Hashmap Hashtable
HASHMAP is a lightweight implementation of Hashtable (non-thread-safe implementation), they all complete the map interface, the main
The difference is that HASHMAP allows null (NULL) key values (key), which may be more efficient than Hashtable due to non-thread safety.
HASHMAP allows NULL to be used as a entry key or value, and Hashtable is not allowed.
HashMap hashtable contains method removed, changed to Containsvalue and ContainsKey. Because contains
method is easy to cause misunderstanding.
Hashtable inherits from the dictionary class, and HashMap is an implementation of the map interface introduced by Java1.2.
The biggest difference is that the Hashtable method is synchronize, and HashMap is not, access in multiple threads
Hashtable, you do not need to synchronize its methods, and HashMap must provide it with external synchronization.
The Hash/rehash algorithms used by Hashtable and HashMap are probably the same, so there is no big difference in performance.
2.
3.
How 4.Web Containers (Tomcat) and Servlets are connected
Java Interview Note 2 (Kingdee)