android - new to java - Class<?> does not accept generic classes -


i created following method:

public  void getclasses (  set<class<?>>param ) { }  

in main, created following :

set<pupilvo> hold = new treeset<pupilvo>(); getclasses(hold);  <-- gives error 

the error is:

the method `getclasses(set<class<?>>)` in type test1 not applicable arguments (`set<test1>`) 

test1 name of class doing code in ...

here pupilvo class looks like.

if limited understanding correct, set<class<?>> means can pass in set of kind of class wish... if true, why error?

you're having issue because method getclasses expects set of class objects, in code you're passing set of pupilvo objects


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -