Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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: 20605
60
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