public class UniquePairUser // demonstrate the UniquePair class { public static void main(String[] args) { UniquePair apair=new UniquePair<>(new Integer(10), new Integer(20)); System.out.println(apair); // shows the unique values apair.set1(new Integer(20)); // since the second item is already 20, this forces the second item to be null System.out.println(apair); // demonstrate that the second item is null } }