how to solve the diamond problem in java

Solutions on MaxInterview for how to solve the diamond problem in java by the best coders in the world

showing results for - "how to solve the diamond problem in java"
Santino
11 Oct 2020
1 // A simple Java program to demonstrate multiple
2// inheritance through default methods.
3 
4
5interface A  
6{
7    // Default method
8 public default void show()
9    {
10        System.out.println("A");
11    }
12}
13interface B 
14{
15    public default void show()
16    {
17        System.out.println("B");
18    }
19}
20public class x implements A,B
21{
22 
23    public static void main(String args[])
24    {
25       new x().display();
26    
27    }
28       public void display()
29    {
30        //B.super.show();
31    }
32    
33}
34
35