I have three classes (Carnivore, Herbivore, and Plant) that extend another class (Organism). How can I tell which subclass an
Carnivore
Herbivore
Plant
Organism
You can use the instanceof operator
instanceof