package ming;import java.util.ArrayList;import java.util.Collection;import java.util.List;class MyClass{ public MyClass(T t){ System.out.println("t value is "+t); }}public class GenericMethodTest { public static void main(String[] args) { //MyClass中声明 E 是String //泛型构造器中声明 T是 Integer //输出结果为5 MyClass myclass = new MyClass (5); //显式指代构造器中T是Integer MyClass myclass2 = new MyClass (5); }}