Hi Please find necessary code: // creating Pair Object Pair pair = new Pair(); // Lets assume that there are two variables names as : first and second // Then code to set String in both pair.setFirst(\"First\"); pair.setSecond(\"Second\"); // getting both object and printing System.out.println(pair.getFirst()); System.out.println(pair.getSecond()); Solution Hi Please find necessary code: // creating Pair Object Pair pair = new Pair(); // Lets assume that there are two variables names as : first and second // Then code to set String in both pair.setFirst(\"First\"); pair.setSecond(\"Second\"); // getting both object and printing System.out.println(pair.getFirst()); System.out.println(pair.getSecond());.