QUESTION 4자격증/OCJP_ExamB2018. 7. 9. 00:27
Table of Contents
반응형
QUESTION 4
Given:
class Thingy {
Meter m = new Meter();
}
class Component {
void go() {
System.out.print("c");
}
}
class Meter extends Component {
void go() {
System.out.print("m");
}
}
8. class DeluxeThingy extends Thingy {
public static void main(String[] args) {
DeluxeThingy dt = new DeluxeThingy();
dt.m.go();
Thingy t = new DeluxeThingy();
t.m.go();
}
}
Which two are true? (Choose two.)
A. The output is mm.
B. The output is mc.
C. Component is-a Meter.
D. Component has-a Meter.
E. DeluxeThingy is-a Component.
F. DeluxeThingy has-a Component.
Solution : AF
반응형
'자격증 > OCJP_ExamB' 카테고리의 다른 글
QUESTION 6 (0) | 2018.07.09 |
---|---|
QUESTION 5 (0) | 2018.07.09 |
QUESTION 3 (0) | 2018.07.09 |
QUESTION 2 (0) | 2018.07.08 |
QUESTION 1 (0) | 2018.07.08 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상