摘要: 平常情况我们通过new Object来生成一个类的实例,但有时候我们没法直接new,只能通过反射动态生成。 通过反射实例化对象: 实例化无参构造函数的对象,两种方式: ① Class. newInstance(); ② Class. getConstructor (new Class[]{}).ne 阅读全文
posted @ 2020-09-04 11:26 禁小呆 阅读(60) 评论(0) 推荐(0)