Skip to content

Instantly share code, notes, and snippets.

@devindianushika
Created October 2, 2019 15:29
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 devindianushika/bb2db7c8ad29d56efea7ae5eb2699395 to your computer and use it in GitHub Desktop.
Save devindianushika/bb2db7c8ad29d56efea7ae5eb2699395 to your computer and use it in GitHub Desktop.
class Parent{
public void m1() {
System.out.println("parent");
}
}
class Child extends Parent{
public void m2(){
System.out.println("child");
}
}
class Test{
public static void main(String[] args) {
Child c = new Child();
c.m1();
c.m2();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment