Last active
August 29, 2015 14:17
-
-
Save aruld/a2b6709f105aaf713e00 to your computer and use it in GitHub Desktop.
Name Clash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class NameClashTest { | |
interface I { | |
void foo(int x); | |
private I foo() { | |
return null; | |
} | |
private void foo(int x) {} // Invalid: method foo(int) is already defined in interface NameClashTest.I | |
} | |
interface J extends I { | |
private J foo() { | |
return null; | |
} | |
} | |
interface K extends J { | |
void foo(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment