宗策

导航

2020年4月9日 #

使用反射调用私有方法

摘要: 1.创建一个Person类,写几个方法 package seday18c; /** * @author xingsir * 创建一个Person类,写几个方法 */ public class Person { public void eat() { System.out.println("我在吃") 阅读全文

posted @ 2020-04-09 16:08 宗策 阅读(5455) 评论(0) 推荐(0)

使用反射,调用有参数的方法

摘要: 1.创建Person类,写几个方法 package seday18c; /** * @author xingsir * 创建一个Person类,写几个方法 */ public class Person { public void eat() { System.out.println("我在吃"); 阅读全文

posted @ 2020-04-09 15:40 宗策 阅读(2436) 评论(0) 推荐(0)

使用反射调用某个类的成员方法

摘要: 1.创建一个Person类,写几个方法 package seday18c; /** * @author xingsir * 创建一个Person类,写几个方法 */ public class Person { public void eat() { System.out.println("我在吃") 阅读全文

posted @ 2020-04-09 15:17 宗策 阅读(369) 评论(0) 推荐(0)