Question: In the following code, where do you find overloading and where do you find overriding? Why? public class HumanBeing { private String name; public HumanBeing(String

In the following code, where do you find overloading and where do you find overriding? Why? public class HumanBeing { private String name; public HumanBeing(String myName) { name = myName; } public String getInfo)( { return "I am a human being " ; }} public class Student extends HumanBeing { private int id; private static int nextId = 0; public Student(String theName) { super(theName); id = nextId; nextId;++ } public int getId() {return id;} public void setId (int theId) { this.id = theId;} public void getInfo(){ System.out.println( "I am a student " ); } public String getInfo(){ return "I am a student " ; } public String getInfo(int num){ String s = "I am a student nr: " +num; return s;}}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!