class GrandPa
{
void Method()
{
System.out.println( "Hello, I am GrandPa! ");
}
}
class Father extends GrandPa
{
void Method()
{
System.out.println( "Hello, I am Father! ");
}
}
class Son extends Father
{
void Method()
{
// 如何调用GrandPa的Method?
super.Method();
System.out.println( "And Son is followed! ");
}
}
在father中在定义一个调用父类的方法,在子类逐级调用。。。
class GrandPa