Question: What will be the output when the above code is executed? Compilation error due to attempting to create an instance of an abstract class Parent
What will be the output when the above code is executed?
Compilation error due to attempting to create an instance of an abstract class
Parent class
Compilation error due to attempting to override a final method
Consider the following code snippet:
public class Parent
public final void display
System.out.printlnParent class";
public class Child extends Parent
public void display
System.out.printlnChild class";
public static void mainString args
Child obj new Child;
obj.display;
Child class
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
