编写简单的hashCode方法
摘要:为什么要编写hashCode方法 hashCode在平时不常自己去编写,但是在真正高质量的代码中却是必不可少的。 看看Java中的Object对hashCode方法的描述: 1.返回对象的哈希码,是为了提高哈希表的性能,例如java.util.HashTable 2.同一个对象多次调...
阅读全文
posted @ 2014-06-13 00:31
posted @ 2014-06-13 00:31
posted @ 2014-06-09 17:23