Question: 23 Consider the following Java code: What will be printed when the following code is executed: new Cat().eat(); ? public class Animal ( }

23 Consider the following Java code: What will be printed when the following code is executed: new Cat().eat(); ? public class Animal ( } public void eat () { System.out.println("Animal is eating"); public class Cat extends Animal ( public void eat () { super.eat(); System.out.println("Cat is eating"); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
