Answer:
The output of the given question is :
Person
Person
Step-by-step explanation:
Following are the description of Statements
- The new Person().printPerson(); calling the function of printPerson() of the class Person so it returns the Person in the console window.
- The new Student().printPerson(); calling the function of printPerson() of the class student .The student inherits the class Person So control will moves to the class it executed the statement inside the Person class So it executed the function public void printPerson() of the Person class so it also returns the Person String and execution of program become stops