# Array List Reverse and Rotation Lab-11 George Mensom University with passed test cases

Fill in the definitions to two ArrayList utility methods in the ALUtils class which is outlined below and included in the code pack for this lab. The methods are described in more detail below.import java.util.ArrayList;
public class ALUtils{
// Creates a copy of the parameter a. Reverses the order of elements
// in the copy and returns the reversed copy. Assumes a is non-null.
public static <T ArrayList<T reverse(ArrayList<T a){

}

// Creates a copy of the given ArrayList a and rotates the copy to
// the right by the given shift. Elements at high indicies wrap
// around to lower indices. Assumes parameter a is non-null and
// that shift is a non-negative number. Returns the rotated copy.
public static <T ArrayList<T rotate(ArrayList<T a, int shift){

}
}In ALUtils, write a method reverse(aL) that takes any type of ArrayList and creates a reversed copy of it which is returned. The nature of this method is shown in the below demo and should produce the results indicated. You may assume that the parameter aL is non-null.public static void demo_reverse(){
ArrayList<String sa = new ArrayList<String();
String [] strings = {"A","B","C","D","E"};

// Use the a for-each to add all strings
for(String s : strings){ sa.add(s); }
// sa == [A, B, C, D, E]

ArrayList<String sb = ALUtils.reverse(sa);
System.out.println(sb);
// [E, D, C, B, A]
System.out.println(sa);
// [A, B, C, D, E] - sa is not changed

ArrayList<Integer ia = new ArrayList<Integer();
Integer [] ints = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};