Hashcode

hashcode.png

hashCodeのテストコード

public void testHashCode() {
        Point p=new Point(0.3f,0.5f);
        Point q=new Point(0.3f,0.5f);
        assertEquals(p,q);
        Point r=new Point(0.2f,0.43f);
        assertTrue("HashCode:",r.hashCode()!=q.hashCode());
    }

set

サポートサイト Wikidot.com set