What is the output of the following code?
```
public class Test {
public static void main(String[] args) {
new Person().printPerson();
new Student().printPerson();
}
}
class Student extends Person {
private String getInfo() {
return "Student";
}
}
class Person {
private String getInfo() {
return "Person";
}
public void printPerson() {
System.out.println(getInfo());
}
}
```
a. Person Person
b. Person Student
c. Stduent Student
d. Student Person
a Note that the getInfo method is private in Person. It is not known to the outside of the class. This is the method invoked from the printPerson() method.
You might also like to view...
In an Android app, the four types of components that represent the entry point into your application are Activity, Service, Content Provider, and Broadcast Receiver.
Answer the following statement true (T) or false (F)
When moving graphics short distances, which is the best course of action?
A) Drag & Drop and Cut & Paste are equally effective. B) Drag & Drop is the best option. C) Cut & Paste is the best option. D) You should never use Drag & Drop nor Cut & Paste when moving graphics.
Which of the following is a constructor without parameters?
A. copy constructor B. default constructor C. finalizer D. modifier
A user is able to access the network shares and their email, but is unable to connect to any website. Which of the following command line tools should a technician use on that users workstation to begin troubleshooting?
A. Traceroute to any website to see where the disconnection is occurring. B. Perform theipconfig command to verify settings on that workstation are correct. C. Use the routeadd command to add static routes to see if the routes are an issue. D. Use the ping command to see if the workstation can access the DHCP server