java.lang.StackOverflowError
From: Asad Khan (uoft_cstutor_at_yahoo.com)
Date: 10/27/03
- Next message: Brad BARCLAY: "Re: java.lang.StackOverflowError"
- Previous message: Asad Khan: "java.lang.StackOverflowError"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 27 Oct 2003 00:00:42 GMT
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.
- Next message: Brad BARCLAY: "Re: java.lang.StackOverflowError"
- Previous message: Asad Khan: "java.lang.StackOverflowError"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|