//反射类main()方法:public static void main(String[] args)
@Test
public void test3() throws Exception{
Class clazz = Class.forName("telecom.xinj.test01.Person");
Method method = clazz.getMethod("main", String[].class);
//方法1
//method.invoke(null,new Object[]{new String[]{"1","2","3"}});
//方法2
method.invoke(null,(Object)new String[]{"1","2","3"});
}
浙公网安备 33010602011771号