java 是否有可用于实现哈希表的内置 class
Does java have a builtin class that can be used to implement a hashtable
java版本“1.8.0_92”
我看过java.util.HashTable<K,V>
只是想知道这是否与处理冲突并计算哈希函数的普通哈希表相同?
我看到很多人自己实现哈希表,只是想知道这个。
感谢您的任何建议,
我找到了关于这些的很好的文档 类:
https://www.tutorialspoint.com/java/java_hashtable_class.htm
https://www.tutorialspoint.com/java/util/java_util_hashtable.htm
正如它描述的那样:
Hashtable was part of the original java.util and is a concrete implementation of a Dictionary.
However, Java 2 re-engineered Hashtable so that it also implements the Map interface. Thus, Hashtable is now integrated into the collections framework. It is similar to HashMap, but is synchronized.
java版本“1.8.0_92”
我看过java.util.HashTable<K,V>
只是想知道这是否与处理冲突并计算哈希函数的普通哈希表相同?
我看到很多人自己实现哈希表,只是想知道这个。
感谢您的任何建议,
我找到了关于这些的很好的文档 类:
https://www.tutorialspoint.com/java/java_hashtable_class.htm https://www.tutorialspoint.com/java/util/java_util_hashtable.htm
正如它描述的那样:
Hashtable was part of the original java.util and is a concrete implementation of a Dictionary.
However, Java 2 re-engineered Hashtable so that it also implements the Map interface. Thus, Hashtable is now integrated into the collections framework. It is similar to HashMap, but is synchronized.