Skip to content

Instantly share code, notes, and snippets.

@irof
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save irof/d8362f37830f07c389f3 to your computer and use it in GitHub Desktop.
Save irof/d8362f37830f07c389f3 to your computer and use it in GitHub Desktop.
public class DiamondProblem implements IHoge, IPiyo {
public static void main(String[] args) {
System.out.println(new DiamondProblem().hoge());
}
}
interface IHoge {
default String hoge() { return "HOGE"; }
}
interface IPiyo extends IHoge {
default String hoge() { return "PIYO"; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment