Question: A) Which super class method is overridden by a subclass. Give the method signature. B) Give an example of method overloading . Give the method



A) Which super class method is overridden by a subclass. Give the method signature.
B) Give an example of method overloading . Give the method signature of the two methods, and mention to which class do they belong to.
public classl Animal private int legs: private boolean hasBrain true: private String eat: public void eat) system.out.printin("Eats food !"); ) public void sleep System.out.print ("Animal sleeps!")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
