public class Test15 {
public static void main(String[]args) {
Student1 s = new Student1("zhangsan",20,"beijing");
System.out.print(s.talk());
}
}
abstract class Person4 {
String name;
int age;
String occuption;
public abstract String talk();
}
class Student1 extends Person4 {
public Student1(String name,int age,String occuption) {
super.name = name;
this.age = age;
this.occuption = occuption;
}
public String talk() {
return"Name: "+this.name+"; Age: "+super.age+"; Occuption: "+occuption;
}
}