Question: The runner code file attached to this assignment is : import java.util.Scanner; import java.util.ArrayList; public class U7_L2_Activity_One{ public static void main(String[] args){ /* code here

 The runner code file attached to this assignment is : import

The runner code file attached to this assignment is :

import java.util.Scanner; import java.util.ArrayList;

public class U7_L2_Activity_One{

public static void main(String[] args){ /* code here */ }

}

Write a Java program that allows a user to input multiple words. Your program should stop accepting words when the user enters "STOP". Store the words in an ArrayList. The word STOP should not be stored in the list. Next, print the ArrayList , then print all the strings from this list in the reverse order to which they appear in the list, with each one on a new line. Sample Run: Please enter words, enter STOP to stop the loop. north east south west STOP [north, east, south, west) West south east north Note: For this activity, you must use the class name. 07_12_Activity_one and the method, main. Hint: printing the entire ArrayList needs only one statement, however to print each String from the list individually on a new line starting from the last value, you will need to write a loop which starts at the end of the list and works backwards through it

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!