Question: Will this program compile? If so what is the output if any. Enter no if it will not compile or enter the output if it
Will this program compile? If so what is the output if any.
Enter no if it will not compile or enter the output if it runs. If no output results enter none.
class Fruit { public Fruit(){ System.out.println("Hello"); } }
class Apple extends Fruit{ public Apple(){ super(); } }
public class RunIt { public static void main(String[] args) { Apple apple = new Apple(); } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
