父类和子类

public class Father {
public void FF1(){
System.out.println("我是FF1");
}
public void FF2(){
System.out.println("我是FF2");
}
}

public class Son extends Father {
public void FF2(){
System.out.println("我是Son的FF2");
}

}

public class test06 {

public static void main(String[] args) {

Father f=new Son();
f.FF2();

}

}

posted @   lizhe313  阅读(100)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示