lundi 1 février 2016

How to pass object type parameter in getMethod() method of java [duplicate]

This question already has an answer here:

Here is my method definition

public String viewDocumentationFor(Class<?> clazz){}

and now i'm writing like this

Method methods = Documentation.class.getMethod("viewDocumentationFor");

so how can i pass parameter in it.





Aucun commentaire:

Enregistrer un commentaire