Course contentsShow
Java
Lesson 1312 of 2,87030. Comparable and ComparatorPro lesson

The compareTo Method Signature

compareTo takes one argument of the same type and returns a negative int, zero, or positive int based on comparison.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.