Question: Write a program that prompts the user to enter three strings. Compare the String objects lexicographically (alphabetically) and print the strings out in alphabetical order.
Write a program that prompts the user to enter three strings. Compare the String objects lexicographically (alphabetically) and print the strings out in alphabetical order. For example, if the three input strings were "abcd", "wxyz", and "pqrs", the program would print: abcd pqrs wxyz. Make a list of values for str1, str2, and str3 that would thoroughly test the code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
