Question: Question 3 3 Consider the following code snippet: public elass Vehicle public void setvehicleclass ( double numberAxles ) 1 1 pabilc Class Motorcycle extends Vehicle
Question
Consider the following code snippet:
public elass Vehicle
public void setvehicleclass double numberAxles
pabilc Class Motorcycle extends Vehicle
public void setvehicleciass double numberAxles
I
Which of the following statements is correct?The Motorcycle class overrides the setvehicleclass method.The Vehicle class overrides the setvehicleClass method,
The Motoreycle class overloads the setVehicleclass method.
The vehicle class overloads the setvehicleclass method.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
