一.題目

and the code fragment:

S2 sobj = new S2(); sobj.display(10, 100);

What is the result?

A. Child 10 Child 100 Parent 100

B. Parent 10 Child 10 Parent 1000

C. Child 10 Parent 100 Parent 100

D. A compile time error occurs.

 

 

二. 答案

D

 

 

 

三. 解析

※: this這個類別

※: super 父類別

缺少 main方法

arrow
arrow
    創作者介紹
    創作者 書童 的頭像
    書童

    小書童

    書童 發表在 痞客邦 留言(0) 人氣()