If I have two interfaces with the same default method, and both are implemented with the / See class. this program.
interface alpha { default void reset() { System.out.println("This is alpha version of default"); } } interface beta { default void reset() { System.out.println("This is beta version of default"); } } class MyClass implements alpha, beta { void display() { System.out.println("This is not default"); } } class main_class { public static void main(String args[]) { MyClass ob = new MyClass(); ob.reset(); ob.display(); } }
what will happen? And also I get an unrelated error with this program.
source share