Skip to content

Instantly share code, notes, and snippets.

Created November 13, 2017 00:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/26ecc44529727bf99036276daa16e709 to your computer and use it in GitHub Desktop.
Save anonymous/26ecc44529727bf99036276daa16e709 to your computer and use it in GitHub Desktop.
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