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
相關文章
相關標籤/搜索