Exception in thread "main" java.lang.IllegalArgumentException: wrong number of arguments...
错误信息:
com.反射.Student
Exception in thread "main" java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at com.反射.Test4.main(Test4.java:23)
解决方法:
自定义的类里面只能有一个构造函数