As my point of view HashMap and Hashtable have significant algorithmic differences as well. No one has mentioned this before so that's why I am bringing it up. HashMap will construct a hash table with power of two size, increase it dynamically and will stir the elements very well for general element types. However, the Hashtable implementation provides better and finer control of the hashing if you know what you are doing, namely you can fix the table size using e. g. the closest prime number to your values domain size and this will result in better performance than HashMap for some cases.
Separate from the obvious differences discussed extensively in this question, I see the Hashtable as a "manual drive" car where you have better control over the hashing and the HashMap as the "automatic drive" counterpart that will generally perform well.
Sorry, but you are not allowed to view signatures , please Register or Login