---
title: "hashcode 的疑惑"
author: "yangbinfc"
date: "2011-03-02T13:06:00Z"
tags: []
slug: "hashcode"
draft: false
lastmod: "2012-11-04T17:47:37Z"
id: 1715355
url: "https://yangbinfc.iteye.com/blog/1715355"
---

1：如果一个对象：ReflectionPoint rp1 中有x y

他存入一个Collection中厚：Collection.add(rp1);

但是如果修改了rp1.y=0;

那么在Colleciotn.remove(rp1)的时候就一处不聊了 ，因为hashcode值变化了

如果进行了很多情况 的话，那么java会出现内存溢出的现象，即使JVM也无能为力