QUESTION 34자격증/OCJP_ExamA2018. 7. 6. 16:38
Table of Contents
반응형
QUESTION 34
Given:
31. //some code here
32. try {
33. //some code here
34. } catch (NullPointerException e1) {
35. //some code here
36. } finally {
37. //some code here
38. }
Under which three circumstances will the code on line 37 be executed? (Choose three.)
A. The instance gets garbage collected.
B. The code on line 33 throws an exception.
C. The code on line 35 throws an exception.
D. The code on line 31 throws an exception.
E. The code on line 33 executes successfully.
Solution : BCE
어떤 상황에서 Finally 가 실행되는지 여부를 묻고 있다 .
Finally 는 try문을 실행하였을 때 와 catch 문에서 예외처리가 발생되었을 때 , try문에서 예외처리가 발생하였을 경우 실행이 된다.
반응형
'자격증 > OCJP_ExamA' 카테고리의 다른 글
QUESTION 36 (0) | 2018.07.08 |
---|---|
QUESTION 35 (0) | 2018.07.06 |
QUESTION 33 (0) | 2018.07.06 |
QUESTION 32 (0) | 2018.07.01 |
QUESTION 31 (0) | 2018.07.01 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상