Class.newInstance()注意点

只要有无参数的构造方法,newInstance()都可以正确执行。否则会报错java.lang.InstantiationException。

猜你喜欢

转载自blog.csdn.net/jeffrey_li/article/details/80005502