When would you use the `compareTo()` method in Java?
You would use `compareTo()` when you need to sort a collection of objects or when you want to determine the relative order of objects that implement `Comparable`.
Impressive! You've got the main use case of `compareTo()` in sorting and ordering.
Can you explain how `compareTo()` works with custom objects, especially when comparing non-primitive types?