阿摩線上測驗 登入

試題詳解

試卷:104年 - SCJP 51-100#99391 | 科目:OJCP(SCJP)

試卷資訊

試卷名稱:104年 - SCJP 51-100#99391

年份:104年

科目:OJCP(SCJP)

72. Given: 
1. package geometry; 
2. public class Hypotenuse { 
3. public InnerTriangle it = new InnerTriangle(); 
4. class InnerTriangle { 
5. public int base; 
6. public int height; 
7. } 
8. }
 Which statement is true about the class of an object that can reference the variable base?
(A) It can be any class.
(B) No class has access to base.
(C) The class must belong to the geometry package.
(D) The class must be a subclass of the class Hypotenuse.
正確答案:登入後查看