This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Afraid I don't think it will. The way compareTo() seems to work with Strings is that it subtracts the numbers of the first letters or characters which differ. Find an ASCII chart and you will see that, A=41, B= 42, C=43, D=44 . . . m=6d . . . r=72, z=7a. (All numbers in hex.) SO: "Campbell".compareTo("David") should return 1 because 'D' - 'C' is 44 - 43 is 1. "Campbell".compareTo("Carol") should return 'r' - 'm' = 72 - 6d = 5. This does not however distinguish differences at the first position and third position, so I don't think compareTo() actually tells you what you are looking for.