Solved

Consider the Following Code Snippet

Question 32

Multiple Choice

Consider the following code snippet:
Public class Vehicle
{
) . .
Public void setVehicleAtrributes()
{
) . .
}
}
Public class Auto extends Vehicle
{
) . .
Public void setVehicleAtrributes()
{
) . .
}
}
Which of the following statements is correct?


A) The subclass is shadowing a superclass method.
B) The subclass is overloading a superclass method.
C) The subclass is overriding a superclass method.
D) This code will not compile.

Correct Answer:

verifed

Verified

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

Related Questions