Imagine you implement the compareTo() method in your class.
As a rule, should x.compareTo(y) == 0 have the same boolean value as x.equals(y) ?
Computer scienceProgramming languagesJavaCode organizationObject-oriented programmingClass hierarchiesInterfaces and abstract classes
Comparable
Rules
Report a typo
Select one option from the list
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.