第二阶段32-泛型_无界通配符
public class Generic1<T> { private T name; public void get(T name){ this.name = name; } public T show(){ return this.name; } } public class get { public void plasiy(Generic1<?>generic1){ System.out.println(generic1.show()); } } public class Test5 { public static void main(String[]args){ get p = new get(); Generic1<Integer> generic1 = new Generic1<>(); generic1.get(34); p.plasiy(generic1); Generic1<String> generic2 = new Generic1<>(); generic2.get("safkk"); p.plasiy(generic2); } }