Reflection API - My program doesn't display the parametertypes of my constructors in the output.
posted 5 years ago
My class looks as follows. It compiles without error and when I run it, it doesn't give me in the command line output the list of parameters in the constructors of class MyThread. Could you please advice?
The method getConstructors() returns only the public constructors of a class; MyThread has none, so you get no output. You perhaps want to use getDeclaredConstructors() which returns all constructors, public or not.