//用泛型方法改进
public class Generic2 {
public <T> void show(T t) {
System.out.println(t);
}
}
public static void main(String[] args) {
Generic2 g1 = new Generic2();
g1.show("张三");
g1.show(18);
g1.show(true);
g1.show(3.14);
}