Solved

Assume a Class Extends Another Class and Implements an Interface

Question 21

Multiple Choice

Assume a class extends another class and implements an interface, both of which define the same method.Which statement is true about this conflict of inherited methods?


A) The compiler will generate an error due to the conflict.
B) The code compiles but generates an exception at run time due to the conflict.
C) The subclass inherits the superclass method and ignores the default method from the interface.
D) There is no conflict because interfaces cannot provide method implementation.

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