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 it is an instance?

12 s
12

if (obj instanceof C) {
//your code
}

Leave a Reply

Your email address will not be published. Required fields are marked *