Java, Programming Languages, Programming, Object Oriented.
method to the Animal class: protected void displayDetailsProtected() { System.out.println("Animal Name: " + name + ", Age: " + age); } It can be overridden in the Animal class like so: @Override public void displayDetailsProtected() { System.out.println("Mammal Name: " + getName() + ", " + "Age: "