有一道十分難題請給予解決

1976liu發表於2003-08-30
class Parent{
private printA(){System.out.println("Parent.printA()");}
protected printB(){System.out.println("Parent.printB()");}
Protected printAB(){printA();printB();}
}
class Child extends Parent{
private printA(){System.out.println("Child.printA()");}
protected printB(){System.out.println("Child.printB()");}
public static void main(String args[]){
Child c=new Child();
c.printAB();
}
}
怎樣從本質上解決上面的問題

相關文章