Add a method swap to the Pair class of Exercise P17.1 that swaps the first and second elements of the pair.

Complete the following file:

Pair.java

Use the following file:

PairTester.java

public class PairTester
{
   public static void main(String[] args)
   {
      Pair<Integer> p = new Pair<Integer>(17, 19);
      p.swap();
      System.out.println(p.getFirst());
      System.out.println("Expected: 19");
      System.out.println(p.getSecond());
      System.out.println("Expected: 17");     
   }
}