This topic contains a solution. Click here to go to the answer

Author Question: What is the output of the following code?public class Test { public static void main(String[] args) ... (Read 66 times)

cdr_15

  • Hero Member
  • *****
  • Posts: 546
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());
}
}

◦ Stduent Student
◦ Person Student
◦ Person Person
◦ Student Person


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by cdr_15 on May 6, 2020

LP

  • Sr. Member
  • ****
  • Posts: 302
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 39% of students answer this correctly




cdr_15

  • Member
  • Posts: 546
Reply 2 on: May 6, 2020
Thanks for the timely response, appreciate it


bassamabas

  • Member
  • Posts: 294
Reply 3 on: Yesterday
Great answer, keep it coming :)

 

Did you know?

Dogs have been used in studies to detect various cancers in human subjects. They have been trained to sniff breath samples from humans that were collected by having them breathe into special tubes. These people included 55 lung cancer patients, 31 breast cancer patients, and 83 cancer-free patients. The dogs detected 54 of the 55 lung cancer patients as having cancer, detected 28 of the 31 breast cancer patients, and gave only three false-positive results (detecting cancer in people who didn't have it).

Did you know?

Oliver Wendell Holmes is credited with introducing the words "anesthesia" and "anesthetic" into the English language in 1846.

Did you know?

Lower drug doses for elderly patients should be used first, with titrations of the dose as tolerated to prevent unwanted drug-related pharmacodynamic effects.

Did you know?

For about 100 years, scientists thought that peptic ulcers were caused by stress, spicy food, and alcohol. Later, researchers added stomach acid to the list of causes and began treating ulcers with antacids. Now it is known that peptic ulcers are predominantly caused by Helicobacter pylori, a spiral-shaped bacterium that normally exist in the stomach.

Did you know?

Approximately one in four people diagnosed with diabetes will develop foot problems. Of these, about one-third will require lower extremity amputation.

For a complete list of videos, visit our video library