}
public void setName(String name)
{
this.name= name;
System.out.println("setName run");
}
public String getName()
{
System.out.println("getName run");
return name;
}
}
class myStudent_5 extends myPerson_5
{
public myStudent_5(String name,int age)
{
super(name,age);
System.out.println("studeng run");
}
}
class myWorker_5 extends myPerson_5
{
public myWorker_5(String name)
{
super(name);
System.out.println("work run");
}
}
class myJichengDemo_4
{
public static void main(String[] args)
{
myStudent_5 stu = new myStudent_5("lisi",25);
myWorker_5 wor = new myWorker_5("lisi");
System.out.println(stu.getName());
System.out.println(wor.getName());
}