This question already has an answer here:
I have the following class structure.
ClassA, with ClassB and ClassC as children.
I want go through a classB and classC only by param.?
I using this code:
public void func(Class<ClassA> A){...}
and use this function:
func(ClassB.class)
But not work, i get the next message:
The methodfunc(Class<ClassA>) in the type ClassWithFunc is not applicable for the arguments (Class<ClassB>)
Any idea for this work?
thanks.
Aucun commentaire:
Enregistrer un commentaire