1、因為cpu是32位的,所以每次最多加載2^32=4G的數據,所以hashcode返回int(32位)是正好的

2、一個字符串在多個應用對應的hashcode不是固定的,都是在應用是唯一的。(應用:an execution of a Java application)
“HashCode并不是要保證所有字符串的唯一性,它只是保證在當前系統的應用上是唯一的”,這里的應用指的是在運行當中的程序。

?

參考:
Whenever it is invoked on the same object more than once during an execution of a Java application,
the hashCode method must consistently return the same integer, provided no information used in equals
comparisons on the object is modified. This integer need not remain consistent from one execution of
an application to another execution of the same application.