Using only the public interface of the linked list class, write a method

public static void reverse(LinkedList<String> staff)

that reverses the entries in a linked list.

Complete the following file:

ListUtil.java

Use the following file:

ReverseTester.java

import java.util.LinkedList;
import java.util.ListIterator;

/**
   A test program to reverse the entries in a linked list.
*/
public class ReverseTester
{  
   public static void main(String[] args)
   { 
      LinkedList<String> names = new LinkedList<String>();
      names.addLast("Dick");
      names.addLast("Harry");
      names.addLast("Romeo");
      names.addLast("Tom");

      ListUtil.reverse(names);
      System.out.println(names);
      System.out.println("Expected: [Tom, Romeo, Harry, Dick]");
   }
}