Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Comparator interface define equals method

 
Vadim Vararu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've looked inside the jdk sources and, namely, in Comparator interface. I've found strange that Comparator interface define the method: "boolean equals(Object object)". Why does it define that method? Anyway, it's implemented in Object already?
 
Rob Spoor
Sheriff
Pie
Posts: 20526
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Javadoc adds some extra rules on the method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic