import static net.mindview.util.Print.*;
class Useful{
public void f(){print("Useful:f()");}
public void g(){print("Useful:g()");}
}
class MoreUseful extends Useful{
public void f(){print("MoreUseful:f()");}
public void g(){print("MoreUseful:g()");}
public void
理解“向上转型”和“向下转型”的简单例子
最新推荐文章于 2024-07-12 21:24:51 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)