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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!