I have a project for class were I need to get 4 different strings inputted and then output them in alphabetical order.
So far I have this:
String wd1
How about putting the Strings in a List and call the sort() method?
List
sort()
The Java String class implements the 'Comparable' interface and thus already has the compareTo() method, which should compare the strings in order.
compareTo()