What will be the output of the following code?

Last Updated :
Discuss
Comments

What will be the output of the following code?

Java
interface A {     default void show() {         System.out.println("A");     } } interface B {     default void show() {         System.out.println("B");     } } class C implements A, B {     public void show() {         A.super.show();     }     public static void main(String[] args) {         new C().show();     } } 

A

B

Compilation Error

Runtime Error

Share your thoughts in the comments