Method coco= d.getMethod("print", new Class[]{int.class,int.class});a1.print(10, 20);//Object go= coco.invoke(a1, new Object[]{2,3});Object deo= coco.invoke(a1, 10,10);Method lwk= d.getMethod("print", String.class,String.class);deo= lwk.invoke(a1, "wode","nadi");//****************************************这一行就不报错呢?*********************String deo= (String) lwk.invoke(a1, "aaaa","vvvv"); //***************为什么这一行输出会报错呢?上面的就不报错了****String deo1 =(String) lwk.invoke(a1, "ddd","cccc");a1.print("nigag", "gagog");
添加回答
举报
0/150
提交
取消