Home » JAVA Programming » Inheritance » Question
  1. What would be the result if a class extends two interfaces and both have a method with same name and signature?
    1. Code runs successfully
    2. First called method is executed successfully
    3. Runtime error
    4. Compile time error
    5. None of these
Correct Option: D

In case of such conflict, compiler will not be able to link a method call due to ambiguity. It will throw compile time error.



Your comments will be displayed only after manual approval.