阅读背景:

为什么字符串的hashCode()不缓存0?

来源:互联网 

I noticed in the Java 6 source code for String that hashCode only caches values other than 0. The difference in performance is exhibited by the following snippet:I noticed in the Java 6 source code for String




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: