posted 17 years ago
While goiing through the K&B certifivcation book, I found the following code and lines:
FIRST : public int hashCode() {return name.length(); }
SECOND: public int hashCode() {return 4; }
It was written in the book that SECOND hashcode method is slower than the FIRST hascode.
What does it means of saying faster(or slower) hashcode in the present context??
Please explain if anyone having clear idea of this.
Thanks in advance.
--------------------------------------------------------