QUESTION 43자격증/OCJP_ExamA2018. 7. 8. 03:48
Table of Contents
반응형
QUESTION 43
Given a class Repetition:
1. package utils;
2.
3. public class Repetition {
4. public static String twice(String s) { return s + s; }
5. }
and given another class Demo:
1. public class Demo {
2. public static void main(String[] args) {
3. System.out.println(twice("pizza"));
4. }
5. }
Which code should be inserted at line 1 of Demo.java to compile and run Demo to print pizzapizza?
A. import utils.*;
B. static import utils.*;
C. import utils.Repetition.*;
D. static import utils.Repetition.*;
E. import utils.Repetition.twice();
F. import static utils.Repetition.twice;
G. static import utils.Repetition.twice;
Solution : F
반응형
'자격증 > OCJP_ExamA' 카테고리의 다른 글
QUESTION 45 (0) | 2018.07.08 |
---|---|
QUESTION 44 (0) | 2018.07.08 |
QUESTION 42 (0) | 2018.07.08 |
QUESTION 41 (0) | 2018.07.08 |
QUESTION 40 (0) | 2018.07.08 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상