java.lang.StackOverflowError

From: Asad Khan (uoft_cstutor_at_yahoo.com)
Date: 10/27/03


Date: Sun, 26 Oct 2003 23:59:59 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.



Relevant Pages

  • java.lang.StackOverflowError
    ... public boolean equals{ ... but when i call this method by "foo.equals(bum)" where foo and bum are some ... keep going round and round. ...
    (comp.lang.java.developer)
  • java.lang.StackOverflowError
    ... public boolean equals{ ... but when i call this method by "foo.equals(bum)" where foo and bum are some ... keep going round and round. ...
    (comp.lang.java.developer)
  • java.lang.StackOverflowError
    ... public boolean equals{ ... but when i call this method by "foo.equals(bum)" where foo and bum are some ... keep going round and round. ...
    (comp.lang.java.programmer)
  • Re: Play Want Bin - SAFE AS F***
    ... before I come round and take make sexual frustration out on your arse/mangstache/arsetache:) ... In fact, she said to me, "Zo, I think it would be good for you and our relationship if you took deKay up the Bum Beard ... And you can't fault deKay. ... It's really hair and the hair on the cheeks are greying and you have too much bum fluff. ...
    (uk.games.video.misc)
  • Re: java.lang.StackOverflowError
    ... Asad Khan wrote: ... > public boolean equals{ ... > keep going round and round. ... From the OS/2 WARP v4.5 Desktop of Brad BARCLAY. ...
    (comp.lang.java.developer)