package lianxi; //package名
class father{
String name;
public father() {
System.out.println("调用父类构造方法");
}
public void walk() {
System.out.print("调用了父类方法");
}
}
class child extends father{
public child() {
super();
}
public void walk() {
super.walk();
}
}
public class sspper { //class标题名
public static void main(String args[]) {
child tt=new child();
tt.walk();
}
}