class HashCodeTest1 { int x; int y; HashCodeTest1(int x, int y) { this.x = x; this.y = y; } public boolean equals(Object o) { if (this.x == ((HashCodeTest1)o).x) return true; return false; } public int hashCode() { return y; } public static void main(String ... args) { HashCodeTest1 obj1 = new HashCodeTest1(10,10); HashCodeTest1 obj2 = new HashCodeTest1(10,20); System.out.println(obj1.equals(obj2)); System.out.println(obj1.hashCode() == obj2.hashCode()); ...