 |
Java String hashcode() base 31 computation (Java in General forum at JavaRanch)
the Java String's hashcode() implementation: s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] (jdk source ... it's locked in now, since they (foolishly?) specified the exact hash formula for String as part of the API. There was no need to do this, and now it
www.coderanch.com |
 |