Question: In this exercise, create a program that asks a user for a phrase, then returns the phrase with the words in reverse order. Use the
In this exercise, create a program that asks a user for a phrase, then returns the phrase with the words in reverse order. Use the String class's .split() method for this. Example input The rain in Spain falls mainly on the plain Example output plain the on mainly falls Spain in rain The
What I have so far:
import java.util.*; /** * * @author Student */ public class SplitString {
//***** Enter the class code here ********
} // end SplitString class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
