Question: Question: What will happen if a class in Java implements two interfaces with identical method signatures? A) Java will throw a compilation error due to
Question: What will happen if a class in Java implements two interfaces with identical method signatures?
A) Java will throw a compilation error due to ambiguity in method resolution.
B) Java will allow the class to implement both interfaces but the method must be explicitly overridden.
C) Java will automatically resolve the conflict by using the method from the first interface.
D) The class must implement both methods separately with distinct names.
Step by Step Solution
There are 3 Steps involved in it
The detailed answer for the above question is provided below The correct option is B Java will allow the class to implement both interfaces but the me... View full answer
Get step-by-step solutions from verified subject matter experts
