Hey guys im stuck on a problem. Say I have an interface Animal. I then have classes that implement it such as Dog, Cat, Goat. say each of these classes has an update() function that they get from the interface.
I have an arraylist of Animal,that includes all different kinds of the animal classes (dog, cat, goat). If i was given a string that says "Goat" how would i search that arraylist and choose only the Goat update() function, ignoring Dog and Cat...