Hello everyone, i'm currently enrolled in an ITCS course at college and we're mainly working with Java. I have an assignment where i have to have the user input three names (can't use dialouge boxes) and then have the program display those names in ascending order. I've looked over the examples listed in my course's textbook and I don't really understand how i'm supposed to do this. The only way I can think of to do it is to use nested if/else statements to compare the names input by the user but again i'm not sure how to do that with characters other than numbers. The program also has to take into account the case of the names when sorting them and i have no idea how to do that. It seems to me that I'm overthinking this assignment and that the solution is really simple, but I'm not sure what it is. If anyone could help me out or point me in the right direction I would greatly appreciate it.

this site is a good way to see whats actually going on with the sorting. http://cg.scs.carleton.ca/~morin/misc/sortalg/

Thanks for the replies. I looked into this bubble sorting and I'm not sure if that's the direction I should go in. In my text book it doesn't even mention it for a couple more chapters and in this class we haven't even touched on arrays yet. This leads me to believe that there's another way to do this other than using bubble sorting. I will try to get this bubble sorting to work but at the same time I am still looking through the book and online to find another possible solution. Again, thank you for the responses.