If class B and class C extend class A and I have an object of type B or C, how can I determine of which type
B
C
A
I use the blow function in my GeneralUtils class, check it may be useful
public String getFieldType(Object o) { if (o == null) { return "Unable to identify the class name"; } return o.getClass().getName(); }