几个定义泛型的例子 类上声明两个类型持有者T1与T2 public class GenericFoo2<Tl, T2> private Tl fool private T2 foo2i Generic Foo<integer, boolean> foo new GenericFoo<Integer, Boolean>()i几个定义泛型的例子 • 类上声明两个类型持有者T1与T2 public class GenericFoo2<T1, T2> { private T1 foo1; private T2 foo2; … } GenericFoo<Integer, Boolean> foo = new GenericFoo<Integer, Boolean>();