Created
November 13, 2017 00:06
-
-
Save anonymous/26ecc44529727bf99036276daa16e709 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
class SuperClass { | |
public void foo() { | |
System.out.println("SuperClass FOO"); | |
} | |
} | |
class SubClass extends SuperClass { | |
@Override | |
public void foo() { | |
System.out.println("SubClass foo"); | |
} | |
} | |
public class JavaTIL { | |
public static void main(String[] args) { | |
SuperClass obj = new SubClass(); | |
obj.foo(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment