Created
July 25, 2012 19:58
-
-
Save tinnet/3178220 to your computer and use it in GitHub Desktop.
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 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