Solved

Consider the Following Code Snippet

Question 15

Multiple Choice

Consider the following code snippet:
Public class Coin
{
) . .
Public boolean equals(Coin otherCoin)
{
) . .
}
) . .
}
What is wrong with this code?


A) A class cannot override the equals method of the Object class.
B) The equals method must be declared as private.
C) A class cannot change the parameters of a superclass method when overriding it.
D) There is nothing wrong with this code.

Correct Answer:

verifed

Verified

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

Related Questions