查阅API之后可知
在jdk9之后class类中的newInstance()方法过时了
我们可以使用
personClass.getDeclaredConstructor().newInstance()
来代替newInstance
查阅API之后可知
在jdk9之后class类中的newInstance()方法过时了
我们可以使用
personClass.getDeclaredConstructor().newInstance()
来代替newInstance