private static void dom5() throws ClassNotFoundException,
NoSuchMethodException, IllegalAccessException,
InvocationTargetException {
//有参的静态方法
String className = "Java_Reosn";
Class clazz = Class.forName(className);
Method method = clazz.getMethod("show", String.class, int.class);
method.invoke(null, "天龙",100);
}
java.lang.ClassNotFoundException: Java_Reosn 请大家帮我看看问题出在那里 |
|