SyntaxFix
Write A Post
Hire A Developer
Questions
compareTo() is called on one object, to compare it to another object. compare() is called on some object to compare two other objects.
compareTo()
compare()
The difference is where the logic that does actual comparison is defined.