Skip to content

Instantly share code, notes, and snippets.

/foo.java Secret

Created November 11, 2015 16:37
Show Gist options
  • Save anonymous/fa62b976ccab60c47fa6 to your computer and use it in GitHub Desktop.
Save anonymous/fa62b976ccab60c47fa6 to your computer and use it in GitHub Desktop.
extending an interface in java
gregf@jupiter:~/JAVA$ javac Test.java
Test.java:8: no interface expected here
public class Test extends Foo {
^
1 error
gregf@jupiter:~/JAVA$ cat Test.java
interface Foo {
public void bar();
}
public class Test extends Foo {
public static void main(String [] args){
}
public void bar() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment