Solved

Consider the Following Code Snippet: Public Class Motorcycle Extends Vehicle

Question 3

Multiple Choice

Consider the following code snippet: public class Motorcycle extends Vehicle
{
) . .
Public Motorcycle(int numberAxles)
{
Super(numberAxles) ;
}
}
What does this code do?


A) It invokes the constructor of the Vehicle class from within the constructor of the Motorcycle class.
B) It invokes the constructor of the Motorcycle class from within the constructor of the Vehicle class.
C) It invokes a private method of the Vehicle class from within a method of the Motorcycle class.
D) This code will not compile.

Correct Answer:

verifed

Verified

Related Questions