Created
August 28, 2015 07:31
-
-
Save jsyeo/28aede5abf13d82d6338 to your computer and use it in GitHub Desktop.
Invoke Special Subclass Super Call
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 { | |
public static void main(String[] args) { | |
B b = new B(); | |
b.foo(); | |
} | |
} | |
class A { | |
void foo() { | |
} | |
} | |
class B extends A { | |
@Override | |
void foo() { | |
} | |
} | |
class C extends B { | |
@Override | |
void foo() { | |
super.foo(); | |
} | |
} | |
class D extends B { | |
@Override | |
void foo() { | |
super.foo(); | |
} | |
} | |
class E extends B { | |
@Override | |
void foo() { | |
} | |
} | |
class F extends A { | |
@Override | |
void foo() { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment