QUESTION 43자격증/OCJP_ExamC2018. 7. 26. 06:20
Table of Contents
반응형
QUESTION 43Given classes defined in two different files:1. package packageA;2. public class Message {3. String getText() {4. return "text";5. }6. }And:1. package packageB;2.3. public class XMLMessage extends packageA.Message {4. String getText() {5. return "<msg>text</msg>";6. }7.8. public static void main(String[] args) {9. System.out.println(new XMLMessage().getText());10. }11. }What is the result of executing XMLMessage.main?A. textB. Compilation fails.C. <msg>text</msg>D. An exception is thrown at runtime.Solution : C
반응형
'자격증 > OCJP_ExamC' 카테고리의 다른 글
QUESTION 45 (0) | 2018.07.26 |
---|---|
QUESTION 44 (0) | 2018.07.26 |
QUESTION 42 (0) | 2018.07.26 |
QUESTION 41 (0) | 2018.07.26 |
QUESTION 40 (0) | 2018.07.25 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상