Solved

Consider the Following Code Snippet: Public Class Motorcycle Extends Vehicle

Question 49

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents