20161108问题解析请点击今日问题下方的“【Java每日一题】20161109”查看
package Nov2016;
import java.lang.reflect.Method;
public class Ques1109 {
public static void main(String[] args) throws Exception {
String methodName = "testMethod";
Method method01 = Test.class.getMethod(methodName); // 1
Method method02 = Test.class.getDeclaredMethod(methodName); // 2
}
static class Test{
void testMethod(){}
}
}
今日问题:
请问主程序能否正常运行?(点击以下“【Java每日一题】20161109”查看20161108问题解析)
题目原发布于公众号、简书:【Java每日一题】20161109,【Java每日一题】20161109
每日一题最新将在公众号发布,欢迎订阅,交流进步
来源:oschina
链接:https://my.oschina.net/u/1864228/blog/784562