Christopher Sheridan wrote:Here is the code. What in the world did I do wrong?
Raed Tabani wrote:I know and I'm not trying to reinvent the wheel, I guess I'm just curious how compareto() finds out which of two given strings has alphabetic priority...does it use the length of the strings and compare characters one at a time?
No one shouldn't stop you of giving a little bit extra to your teacher than he expects.
Christopher Sheridan wrote:Also, I was instructed to create the array in main.
I'm still learning the headings of methods. For example, why were all of them except main private? I've only titled methods "public".
Good point, fair enough.
I'll submit the old one for the assignment, but I made a new project to try this out. I honestly like this version better. It's more concise, but I don't want to use things we haven't formally learned yet.