class SaveMe implements Serializable{
transient int x;
int y;
SaveMe(int xVal, int yVal) {
x = xVal;
y = yVal;
}
public int hashCode() {
return (x ^ y); // Legal, but not correct to
// use a transient variable
}
public boolean equals(Object o) {
SaveMe
test = (SaveMe)o;
if (test.y == y && test.x == x) { // Legal, not correct
return true;
} else {
return false;
}
}
}
my doubt is
test.y refers to which y
and test.x refers to which x
please explain in detail
thanks in advance