Hashing function in Hashtable vs. HashMap?
问题 I know the difference between Hashtable and HashMap. However, both these classes seemingly are using a hash function to get the job done. Is there a difference between the hash function used in Hashtable, and the hash function used in HashMap? In particular, is there a difference between the hashing algorithm they use? What is the formula used to hash in these two classes? In other words, is the way for calculating index (hash value) different? 回答1: In particular, is there a difference