Issue
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?
Solution
if (obj instanceof C) {
//your code
}
Answered By - IAdapter
Answer Checked By - Robin (JavaFixing Admin)