class A
{
public void display()
{
System.out.println("Class A display!!!");
}
}
class B extends A
{
public void display()
{
System.out.println("Class B display!!!");
}
}
class C extends B
{
public void display()
{
System.out.println("Class C display!!!");
super.display(); // will call B's display() method
// how to call A's display() method here?
}
}
public static void main(String args[])
{
C obj = new C();
obj.display(); // will call C's display() method
}
}
如何从A
的{{1}}方法调用display()
C
方法?是否可以使用display()
以某种方式调用A
display()
方法?