Skip to content

Instantly share code, notes, and snippets.

@tinnet
Created July 25, 2012 19:58
Show Gist options
  • Save tinnet/3178220 to your computer and use it in GitHub Desktop.
Save tinnet/3178220 to your computer and use it in GitHub Desktop.
public class Main {
static interface InterfaceA {
public void speak();
}
static interface InterfaceB extends InterfaceA {
public void sit();
}
static class ImplementsA implements InterfaceA {
public void speak() {
System.out.println("ImplementsA");
}
}
static class Foo extends ImplementsA implements InterfaceB {
public void sit() {
System.out.println("I am sitting");
}
}
public static void main(String[] args) {
System.out.println("Hello");
Foo foo = new Foo();
foo.speak();
foo.sit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment