多肽
Children
package Polypeptide;
public class Children extends Father {
public void exit(){
System.out.println("你儿子16了");
}
public void girl(){
System.out.println("你女子12了");
}
}
Father
package Polypeptide;
/**
* 多肽
*/
public class Father {
public void exit(){
System.out.println("你爸爸56了");
}
}
Instance
package Polypeptide;
public class Instance {
public static void main(String[] args) {
/*
// 引用多肽 既可以引用父类也可以引用子类
Father far = new Father();
Children chil = new Child