package text;
class Parent
{
int x;
public Parent()
{
System.out.println("Parent Created1");
}
public void show(){
System.out.println("Parent Created2");
}
}
class Child extends Parent
{
int y;
public Child()
{
System.out.println("Child Created1");
}
public void show(){
super.show();
System.out.println("Parent Created3");
}
}
public class text
{
public static void main(String args[])
{
Child c = new Child();
c.show();
}
}
标签:Parent,show,子类,System,Child,父类,super,public,out From: https://www.cnblogs.com/liuxuefeng/p/16857606.html