Answers for "how to solve the diamond problem in java"

0

how to solve the diamond problem in java

// A simple Java program to demonstrate multiple
// inheritance through default methods.
 

interface A  
{
    // Default method
 public default void show()
    {
        System.out.println("A");
    }
}
interface B 
{
    public default void show()
    {
        System.out.println("B");
    }
}
public class x implements A,B
{
 
    public static void main(String args[])
    {
       new x().display();
    
    }
       public void display()
    {
        //B.super.show();
    }
    
}
Posted by: Guest on August-31-2021

Code answers related to "how to solve the diamond problem in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language