上圖中Person類別是父類別,而DemoSuper是繼承它的子類別,而子類別會繼承父類別的方法, 也就是說當ds.print()時,程式的動作應該和父類別的動作一樣是System.out.print.
確定! 回上一頁