I want to check if an object o is an instance of the class C or of a subclass of C.
o
C
For instance, if p is of clas
p
I think you're confused about instanceof for raw objects and generic ones
obj instanceof Class obj instanceof Class> // this is the one you want