Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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