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
Post a Comment