Question: answer it as soon as possible . you have to find the output of above mentioned program (java). What will be the output of the

answer it as soon as possible . you have to find the output of above mentioned program (java).
What will be the output of the given code? public class Ferrari extends Car { public static void main(String[] args) { new Ferrari(); } public Ferrari () { System.out.println("(4) Ferrari's no-arg constructor is invoked"); 1 class Car extends Vehicle { public Car() { this("(2) Invoke Car's overloaded constructor"); System.out.println("(3) Car 's no-arg constructor is invoked"); } public Car (String s) { System.out.println(s); } ) class Vehicle { public Vehicle() { System.out.println("(1) Vehicle's no-arg constructor is invoked")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
