I have a problem and I canโt figure out how to do this.
I have this Creature superclass with subclasses Man and Zombies. I built a series of people and zombies and saved them in an ArrayList. Now I want to get a subArrayList that contains only constructed people. I thought I could use "keepAll", but it turns out that it does not do what I thought it would do.
Any suggestions on how to create a new ArrayList with Zombie subclass objects in it?
source share