2005年3月24日
摘要: 今天有同事提议用String的hashcode得到int类型作为主键。其实hashcode重复的可能性超大,下面是java的缺省算法: publicinthashCode(){ inth=hash; if(h==0){ intoff=offset; charval[]=value; ... 阅读全文
posted @ 2005-03-24 00:08 steeven 阅读(14056) 评论(2) 推荐(1) 编辑