If the ArrayList has a collection of person, friend and relative objects where they have relationships of inheritance. friend is subclass of person and relative is the subclass of friend.
How do I distinguish any object which is retriving from ArrayList is an instant of that particular class? For example:
The object that we are retrieving from ArrayList could be object of Person or object of friend or object of relative.
How do I distinguish any object which is retriving from ArrayList is an instant of that particular class? For example:
The object that we are retrieving from ArrayList could be object of Person or object of friend or object of relative.
Comment