r/programmingbydoing • u/FancyMonocle • Feb 11 '13
Assignment 39 - compareTo() challenge - Explanation on how it works?
The lesson gives an extremely brief description and gives you an example code from which you're able to figure out the gist of what's going on. However, I feel as if the compareTo() method isn't really explained. When I tried to run the assignment, I'd get values of positive and negative, but I wouldn't understand why I'd get specific values.
I'm guessing this is one of the assignments that's missing a lecture perhaps? I would greatly appreciate an explanation since I'm having a hard time finding good explanations from google.
View all comments
Show parent comment
1
u/FancyMonocle Feb 11 '13
Is the value determined by how far apart they are when arranged in alphabetical order?