• Post Reply Bookmark Topic Watch Topic
  • New Topic

equals() method overide from which class  RSS feed

 
sumanta panda
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

In Java equals() method overide from which class?

Thanks and Regards,
Sumanta Pnada
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you create a new class without an equals method or an extends clause and you try to call the equals method on that class it works doesn't it ?
Therefore your class must have inherited the equals method from one of its parents. Work your way up the inheritance tree of your class and find which one implements equals.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!