Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

Comparator interface

 
swaraj gupta
Ranch Hand
Posts: 182
C++ Java Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is from KS and BB book, why it is getting possible for the class ReSortComparator to use compareTo() method of Comparable interface in compare() method, though ReSortComparator class doesn't implements it.
And whats actually internally happening at line 12 and why we have done so..?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
Closing duplicate of this.
 
    Bookmark Topic Watch Topic
  • New Topic