Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Duplicate default methods named abc with the parameters () and () are inherited from the types C and B
- abstract class A {
- }
- interface B {
- default void abc() {
- System.out.println("Interface B");
- }
- }
- interface C {
- default void abc() {
- System.out.println("Interface C");
- }
- }
- public class Test extends A implements B, C {
- public static void main(final String[] args) {
- final Test t = new Test();
- t.abc();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement