执行代码

public class Demo06 {
public static void main(String[] args) {
String s="hello";
System.out.println(s.hashCode());
}
}
以下是hashCode()源码
public int hashCode() {
int h = hash;
if (h == 0 && value.length > 0) {
char val[] = value;

for (int i = 0; i < value.length; i++) {
h = 31 * h + val[i];
}
hash = h;
}
return h;
}