Let us say there is a class X. Then, the following line returns an instance of Class which represents X
Class c = X.class;
Assume there is a method foo()
public void foo(X x){.....}
Is it legitimate to do
foo(c);
Aucun commentaire:
Enregistrer un commentaire