You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Demo.java 369B

123456789101112131415161718192021222324
  1. interface Foo {
  2. default void printMessage() {
  3. System.out.println("GW");
  4. }
  5. }
  6. interface Bar {
  7. default void printMessage() {
  8. System.out.println("HW");
  9. }
  10. }
  11. class FooImpl implements Foo,Bar {
  12. public void printMessage() {
  13. Bar.super.printMessage();
  14. }
  15. }
  16. public class Demo {
  17. public static void main(String[] args) {
  18. new FooImpl().printMessage();
  19. }
  20. }