Solved

Consider the Following Code Snippet

Question 25

Multiple Choice

Consider the following code snippet:
Public class Vessel
{
) . .
Public void setVesselAtrributes()
{
) . .
}
}
Public class Speedboat extends Vessel
{
) . .
Public void setVesselAtrributes()
{
) . .
}
}
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

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