转载自:http://blog.csdn.net/hengyunabc/article/details/7198533JDK6的源码:[java]view plaincopy/***Returnsahashcodeforthisstring.Thehashcodefora*Stringobjectiscomputedas**s[0]*31^(n-1)+s[1]*31^(n-2)+...+s[n-1]**usingintarithmetic,wheres[i]isthe*ithcharacterofthestring,nisthelengthof*thestring,and^indicatese
Read More