Class.class文件中,
public Method getMethod(String name, Class<?>... parameterTypes)
throws NoSuchMethodException, SecurityException
其中的参数 Class<?>是什么意思?非常谢谢大家啊。
public Method getMethod(String name, Class<?>... parameterTypes)
throws NoSuchMethodException, SecurityException
其中的参数 Class<?>是什么意思?非常谢谢大家啊。
如果是泛指的话用这个Class<T>
具体的就用具体类型Class<? extends String> s=ss.getClass(); 或者 Class<String> s= (Class<String>) ss.getClass();