Solved

Consider the Following Code Snippet: Public Class Vessel

Question 42

Multiple Choice

Consider the following code snippet: public class Vessel
{
) . .
Public void setVesselClass(double numberAxles)
{
) . .
}
}
Public class Speedboat extends Vessel
{
) . .
Public void setVesselClass(double numberAxles)
{
) . .
}
}
Which of the following statements is correct?


A) The Speedboat class's setVesselClass method overrides the Vessel class's setVesselClass method.
B) The Vessel class's setVesselClass method overrides the Speedboat class's setVesselClass method.
C) The Speedboat class's setVesselClass method overloads the Vessel class's setVesselClass method.
D) The Vessel class's setVesselClass method overloads the Speedboat class's setVesselClass method.

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