Java - Inheritance
Given these classes, how can you modify the Child class to call both its own display() method and the Parent class's display() method inside its showBoth() method?
class Parent {
void display() {
System.out.println("Parent display");
}
}
class Child extends Parent {
void display() {
System.out.println("Child display");
}
void showBoth() {
// What code goes here?
}
}