Let\'s say that I have a class A, and that B,C,D are derived from A. If I want to know what\'s the type of an object referenced, I can declare:
// pseudo-c
You could do
if (obj1.getClass() == obj2.getClass()) { ... }