What will be the output of the following program.
Correct Answer : A
The first line inside
main is as follows:
Bike bike = new Bike();
bike is an object to be created of type
new Bike() calls the constructor. But the constructor without parameters is not defined. Constructor for class
Bike is defined with 3 parameters. Hence there will be mismatch in parameters. This leads to compilation error as the constructor with no parameters
Bike() is not found.