关于接口

interface B1{};
interface B2{};
class A implements B1,B2{

}
B1 b = new A();
B2 b2 = (B2)b;

是合法的。这就是接口的多态。

原文地址:https://www.cnblogs.com/liaoxiaolao/p/9888174.html