class="java" name="code">package generic; /** * 泛型方法测试 * * @author caiyu * */ public class GenMethod { public static <T> void display(T t) { System.out.println(t.getClass()); } }