Class<Person> c = Person.class; Person p = c.newInstanace(); Method m = c.getMethod("setAge",Integer.class); m.invoke(p,33);
反射创建对象
原文:https://www.cnblogs.com/abuduri/p/13290575.html