// generics/TupleList.java // Combining generic types to make complex generic types. import java.util.*; import onjava.*; public class TupleList extends ArrayList> { public static void main(String[] args) { TupleList tl = new TupleList<>(); tl.add(TupleTest.h()); tl.add(TupleTest.h()); for(Tuple4 i: tl) System.out.println(i); } } /* Output: (Vehicle@139a55, Amphibian@1db9742, hi, 47) (Vehicle@106d69c, Amphibian@52e922, hi, 47) */