Constructors - Java Quiz Question


What will be the output of the following program.


A
Compilation error - since in the Bike class constructor - mileage and diskBrakes are not initialized.
B
Compilation error - since data is assigned to member variables - mileage and diskBrakes - after the object is created.
C
Compilation error - since in the Bike class constructor, the parameter names companyParam, modelParam and ccParam are different from member variables company, model and cc.
D
Hero Honda's Shine gives a mileage of 72.5kmpl.