two string with same hashcode (Java in General forum at JavaRanch)
How to make two different string to have same hashcode? [code=java]string s1="nokia"; string s2= "samsung" [/code] ... The char variable has a range of 65535 values The hash value of a string is given by h(i+1) = h(i)*31 + (int)str[i]; Since 31 is less th
www.coderanch.com |