Skip to content

Instantly share code, notes, and snippets.

@making
Created March 21, 2014 05:22
Show Gist options
  • Save making/9680019 to your computer and use it in GitHub Desktop.
Save making/9680019 to your computer and use it in GitHub Desktop.
public interface A {
default int hoge() {
return 100;
}
}
public interface B {
default int hoge() {
return 200;
}
}
public interface C extends A, B {
@Override
default int hoge() {
return 300;
}
}
public interface Main {
public static void main(String[] args) {
C c = new C() {
};
System.out.println(c.hoge());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment