Learn more in the app.
View in app
Constructors - Java Quiz Question
What will be the output of the following program.
Compilation error - since in the Bike class constructor - mileage and diskBrakes are not initialized.
Compilation error - since data is assigned to member variables - mileage and diskBrakes - after the object is created.
Compilation error - since in the Bike class constructor, the parameter names companyParam, modelParam and ccParam are different from member variables company, model and cc.
Hero Honda's Shine gives a mileage of 72.5kmpl.