Illgal argument Exception in getDeclaredConstructor

I tried accessing the constructor for a class using reflection. getDeclaredConstructor (String.class,List.class,List.class,List.class,List.class) And my actual constructor is a constructor with 1 String parameter and 4 two dimensional list. But this throws Illegal argument exception:wrong number of parameters. But if I pass just 1 or 2 parameters it throws no such method exception not illegal argument. Why this happens?


2 Answers
1-2 of  2
2 Answers
  • getting DeclaredConstructor doesnot give IllegalArgumentException .
    you must change the parameter name. please send me whole problem once.

Core Java

Didn't get the answer.
Contact people of Talent-Core Java directly by clicking here