利用class.forName()得到class对象,然后调用它的newInstance方法可以得到实例。
不过这种方法调用的是无参的构造方法。
如果想调用它的有参构造方法,需要用到construct方法。
refurl:http://www.cnblogs.com/rollenholt/archive/2011/09/02/2163758.html
利用class.forName()得到class对象,然后调用它的newInstance方法可以得到实例。
不过这种方法调用的是无参的构造方法。
如果想调用它的有参构造方法,需要用到construct方法。
refurl:http://www.cnblogs.com/rollenholt/archive/2011/09/02/2163758.html