A
Asad Khan
I have the following method inside I class,
public boolean equals(Object o) {
return (this.equals(o));
}
but when i call this method by "foo.equals(bum)" where foo and bum are some
objects, I get a java.lang.StackOverflowError??
I kinda know why its happening; I think it calls the same equals method and
keep going round and round. But, this is what I have to do, without renaming
the method, so what's the way around it?
Thanks.
public boolean equals(Object o) {
return (this.equals(o));
}
but when i call this method by "foo.equals(bum)" where foo and bum are some
objects, I get a java.lang.StackOverflowError??
I kinda know why its happening; I think it calls the same equals method and
keep going round and round. But, this is what I have to do, without renaming
the method, so what's the way around it?
Thanks.