vendredi 25 janvier 2019

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?





Aucun commentaire:

Enregistrer un commentaire