/** * Generics Compilation questions. * * @author Nathan Sprague * @version V1, 8/2016 * */ public class CompileDriver { public static void main(String[] args) { Pair p1; Pair p2; Pair p3; Pair p4; Pair p5; p1 = new Pair("A", 7); int a = p1.getSecond(); p1 = new Pair(23, 12.0); p2 = new Pair("B", 8); p3 = new Pair("C", 9); p4 = new Pair("House", "Car"); p4 = new Pair("D", 10); Integer b = p4.getSecond(); Integer c = (Integer) p4.getSecond(); p5 = new Pair("E", "G"); p5 = new Pair("E", 11.0); p5 = new Pair("E", 11); Integer d = p5.getSecond(); Integer e = (Integer) p5.getSecond(); } }