单选题

其中"c.getDeclaredMethods"的作用是:

发布于 2022-03-03 14:04:39

其中"c.getDeclaredMethods"的作用是:
import java.lang.reflect.Method
public class DumpMethods{
public static void main(String[] args) {
try {
Class c=Class.forName(args[0])
Method m[]=c.getDeclaredMethods()
for (int i = 0 i < m.length i++) {
System.out.println(m[i].toString())
}
} catch (Throwable e) {
System.err.println(e)
}
}
}

登录后免费查看答案
关注者
0
被浏览
54