What will be the output of this program?
abstract class Parent {
abstract void show();
}
class Child extends Parent {
void show() {
System.out.println("Child class method");
}
}
public class Main {
public static void main(String[] args) {
Parent p = new Child();
p.show();
}
}
Compilation Error
Runtime Error
Child class method
No Output
This question is part of this quiz :
Java Inheritance and Abstraction,50 Java Language MCQs with Answers