Solved

Consider the Following Code Snippet

Question 46

Multiple Choice

Consider the following code snippet:
Public class Motorcycle extends Vehicle
{
) . .
Public Motorcycle(int numberAxles)
{
Super(numberAxles) ; //line #1
}
}
If the line marked "//line #1" was missing, which of these statements would be correct?


A) The Motorcycle class constructor would invoke the constructor of the Vehicle class with no parameters.
B) The Vehicle class constructor would invoke the constructor of the Motorcycle class with no parameters.
C) The Motorcycle class constructor would invoke the constructor of the Vehicle class with a parameter value of 0.
D) This code would not compile.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions