QUESTION 37자격증/OCJP_ExamA2018. 7. 8. 02:03
Table of Contents
반응형
QUESTION 37
Given:
01. Float pi = new Float(3.14f);
02. if (pi > 3) {
03. System.out.print("pi is bigger than 3. ");
04. }
05. else {
06. System.out.print("pi is not bigger than 3. ");
07. }
08. finally {
09. System.out.println("Have a nice day.");
10. }
What is the result?
A. Compilation fails.
B. pi is bigger than 3.
C. An exception occurs at runtime.
D. pi is bigger than 3. Have a nice day.
E. pi is not bigger than 3. Have a nice day.
Solution : A
finally 는 try 없이 사용 할 수 없다 .
반응형
'자격증 > OCJP_ExamA' 카테고리의 다른 글
QUESTION 39 (0) | 2018.07.08 |
---|---|
QUESTION 38 (0) | 2018.07.08 |
QUESTION 36 (0) | 2018.07.08 |
QUESTION 35 (0) | 2018.07.06 |
QUESTION 34 (0) | 2018.07.06 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상