Write a generic class Pair which has 2 type parameters, F and S
Question
<ol><li>Write a generic class Pair which has 2 type parameters, F and S, representing the type of the
first and second elements of a pair respectively. </li><li>Add <em>get</em> and <em>set</em> methods for the first and second elements of the pair.</li><li>Override the toString() method to display the first and second values of the pair in a format of your choosing.</li><li>Use the Pair class in a program that creates an ArrayList of 10 Pair objects containing values of your choosing. The program will then print the string representation of each Pair to System.out (i.e., use the toString() method).</li><li>Take a screenshot of your output and paste it into the Word document you created for the first exercise, but place the screenshot under a header for âExercise 2.â</li></ol>