透过反射执行某类的方法

通过反射执行某类的方法LotteryManager lmnew LotteryManager()Method methodLotteryManager.class.get

通过反射执行某类的方法
LotteryManager lm=new LotteryManager();Method method=LotteryManager.class.getMethod(methodName,String.class);method.invoke(lm,"Jhone");

?

?

?

?