Question: Assume a class implements two interfaces, both of which define a default method with the same signature. Which statement is true about this conflict of
Assume a class implements two interfaces, both of which define a default method with the same signature. Which statement is true about this conflict of inherited methods?
There is no conflict because interfaces cannot provide method implementation.
The code compiles but generates an exception at run time due to the conflict.
The class must override the method and provide its own implementation.
The code compiles and the implementation is chosen at run time.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
