Package java.lang
Class String

Public Method hashCode

int hashCode()

Overrides:

_INSERT_METHOD_SIGNATURE_HERE_

Description:

Returns a hash code for this string. The hash code for a String object is computed as − s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] where, s[i] is the i-th UTF8 byte of the string. The hash value of the empty string is zero.