Question: THIS IS RUNNER CODE: import java.util.Scanner; import java.util.ArrayList; public class runner_U7_L3_Activity_One{ public static void main(String[] args){ Scanner scan = new Scanner(System.in); ArrayList words = new

THIS IS RUNNER CODE: import java.util.Scanner; import java.util.ArrayList;
public class runner_U7_L3_Activity_One{
public static void main(String[] args){ Scanner scan = new Scanner(System.in); ArrayList
Instructions Write a public static void method named shiftright which takes a single parameter of an ArrayList of string objects. The method should shift every element of the parameter ArrayList one position to the right, and move the last element of the list into the first position. For example, if the parameter list passed to the method initially prints as [I, am, here, this would become there, i, ami after the method is executed. Write your shiftRight method in the U7_13_Activity_One class. Use the runner class to test your method but do not add a main method to your U7_LB_Activity_One.java file or your code will not be scored correctly. Hint: think about which built in ArrayList methods can cause multiple elements to shift when they are called
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
