阅读背景:

如果哈希表中的键是一个类对象,那么containsKey是如何工作的?

来源:互联网 

When we put a class Object (that has say three data members) in a hashtable, how can I prevent putting another entry into the hash table whose key has the same three data members ? Cos I am guessing this will be a new object. So hashtable.containsKey() will return false even when there is a key (this class object) that has the very same data members as the one that is waiting to be inserted. When we put a class Object (that has say three




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: