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
You can do:
if (foo instanceof classNameYouWantToCheck)