摘要: 通过反射机制,获取类对象 ——通过类名获取 Class<?> cType1 = Test.class; cTpye1 为Test的Class对象 cType1.newInstance() 调用这个方法后获取Test类的实例对象。 ——通过类的全名称 Class<?> cType2 = Class.f 阅读全文
posted @ 2018-04-16 15:28 小小风思 阅读(97) 评论(0) 推荐(0)