标签:extends print class end uga 分享 new xtend []
动手动脑:
源程序:
public class FuGai {
public static void main(String[] args) {
// TODO Auto-generated method stub
B b=new B();
b.shuChu();
b.shuChuA();
}
}
class A{
public void shuChu(){
System.out.println("A");
}
}
class B extends A{
public void shuChu(){
System.out.println("B");
}
public void shuChuA(){
super.shuChu();
}
}
结果截图:
标签:extends print class end uga 分享 new xtend []
原文地址:http://www.cnblogs.com/haojun/p/6051948.html