class Father
{
protected void methodA(){ //do something }
private void methodB(){//do something }
}
class Child:Father
{
} 那么Child child=new Child();
child.methodA(); //Right
child.methodB(); //Wrong
2024-04-06 09:46:07
class Father
{
protected void methodA(){ //do something }
private void methodB(){//do something }
}
class Child:Father
{
} 那么Child child=new Child();
child.methodA(); //Right
child.methodB(); //Wrong