001package factory.factorymethod;
002public class Main {
003        public static void main (String[] args) {
004                Triple<String> t1 = new FieldTriple<String>("dog", "cat", "pig");
005                Triple<String> t2 = new ArrayTriple<String>("daisy", "rose", "tulip");
006                for (String s : t1)
007                        System.out.println(s);
008                for (String s : t2)
009                        System.out.println(s);
010        }
011}