public class TripleTest { public static void main(String[] args) { Triple test = new Triple<>(1, "abc", 1.4); System.out.printf("(%d, %s, %g)%n", test.fst, test.snd, test.thd); } }