Java中的属性覆盖 向上转型之后调用子类的变量(与父类中变量同名) 方法的问题

先上代码 public class Son extends Father { public int i = 100; public void show() { System.out.println("子类 方法!!!"); } public static void main(String[] args) { Father son = new Son(); son.show
相关文章
相关标签/搜索