public int hashCode () {
Int h=hash;
If (h==0 & amp; & Value. The length & gt; 0 {
Char val []=value;
for (int i=0; I & lt; Value. Length; I++) {
H=31 * h + val [I];
}
Hash=h;
}
Return h;
}
DB2 to create a custom function
CREATE OR REPLACE FUNCTION HASH_CODE
RETURN INT
IS
The BEGIN
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The RETURN of 111111
END HASH_CODE;