Question: java code Qu Complete the following Java program by typing in the missing statements in the space provided. This program defines an abstract superclass with
Qu Complete the following Java program by typing in the missing statements in the space provided. This program defines an abstract superclass with a variable and abstract method, and then extends two subclasses which implement the abstract method. The main method in the application class creates objects of subclasses and call the only method in them. abstract class Base intx-5 abstract int getX() class Subt int gelXoroturn 2x) dass Sub2 int geox (return 3x) public class My App public static void main Base B new Sub 10), System out printin("Value by Subt call the method Benew Sub20 System out printinValue by Sub2 call the mothod 2 2 H OUTPUT I Value by Sub1 10 Value by Sub2 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
