JAVA小问题,从第二个System就不太懂了,有大佬能麻烦讲讲吗

interface Aclass {
public String show(Aclass obj) ;
}
class Bclass implements Aclass{
@Override
public String show(Aclass obj) {
return ("show(1 obj)");
}

public String show(Bclass obj){
return "show(2 obj)";
}

}
class C extends Bclass {
public String show(Bclass obj){
return "show(3 obj)";
}
}

public class InterfaceTest1 {
public static void main(String[] args){
Bclass fc1=new Bclass ();
C c2=new C();
Aclass f3= new C();

    System.out.println("1-"+fc1.show(fc1));//1-show(2 obj)
    System.out.println("2-"+c2.show((C)f3));//2-show(3 obj)
    System.out.println("3-"+((Bclass)f3).show(c2));//3-show(3 obj)
    System.out.println("3-"+((Bclass)f3).show(fc1));   //3-show(3 obj) 
}

}

因为c2 f3都是C类型的(new C()),所以无论怎么转换,调用的show都是C的show

打一个比方:让几个人来说一句话,找来的是中国人,那么让他讲话,无论是作为人,亚洲人还是中国人,他都只能说中国话。

或者说,只有这样,C这个类的show的定义才有意义,它实现了编写代码实现对show自定义,如果还是调用基类的show,那么它就没有存在的意义了。因为基类是先被编写出来的,它不需要依赖派生类再调用自己的方法。

结果
1-show(2 obj)
2-show(3 obj)
3-show(3 obj)
3-show(3 obj)