`
sokoo108
  • 浏览: 1089 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论
文章列表
Why does Java's hashCode() in String use 31 as a multiplier? In Java, the hash code for a String object is computed as s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] using int arithmetic, where s[i] is the ith character of the string, n is the length of the string, and ^ indicates exponentiation. Wh ...
Global site tag (gtag.js) - Google Analytics