QUESTION 1자격증/OCJP_ExamC2018. 7. 19. 23:34
Table of Contents
반응형
QUESTION 1Given:11. String test = "Test A. Test B. Test C.";12. // insert code here13. String[] result = test.split(regex);Which regular expression, inserted at line 12, correctly splits test into "Test A", "Test B", and "Test C"?A. String regex = "";B. String regex = " ";C. String regex = ".*";D. String regex = "\\s";E. String regex = "\\.\\s*";F. String regex = "\\w[ \.] +";Solution : E
plus imformation
A.
T
e
s
t
A
.
T
e
s
t
B
.
T
e
s
t
C
.
B.
Test
A.
Test
B.
Test
C.
C.
<no output>
D.
Test
A.
Test
B.
Test
C.
E.
Test A
Test B
Test C
F.
Main.java:12: illegal escape character
String regex = "\\w[ \.] +";
^
1 error
반응형
'자격증 > OCJP_ExamC' 카테고리의 다른 글
QUESTION 6 (0) | 2018.07.21 |
---|---|
QUESTION 5 (0) | 2018.07.21 |
QUESTION 4 (0) | 2018.07.20 |
QUESTION 3 (0) | 2018.07.20 |
QUESTION 2 (0) | 2018.07.19 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상