摘要: 经常被问到hashcode方法和equals方法还有== ,网上都有结论,但我们不能知其然却不知其所以然。所以我们从string的hashcode和equals入手,探究这3者,先贴源码。 public int hashCode() { int h = hash; if (h == 0 && val 阅读全文
posted @ 2018-11-30 04:49 sagan15 阅读(709) 评论(0) 推荐(0) 编辑