I need a method where i could pass on a parameter which i assume would be a Class (not sure though) and in that method, instanceof would be used to check if x is an instance of the passed Class.
How should i do that? I tried a few things but none worked.
How about this:
or if
SomeClassneeds to be a parameter:or if you want the instance to be
someClassand NOT an instance of a subclass ofsomeClass: