QUESTION 48자격증/OCJP_ExamA2018. 7. 8. 19:08
Table of Contents
반응형
QUESTION 48
Given:
public class Yippee {
public static void main(String [] args)
{
for(int x = 1; x < args.length; x++)
{
System.out.print(args[x] + " ");
}
}
}
and two separate command line invocations:
java Yippee
java Yippee 1 2 3 4
What is the result?
A. No output is produced. 1 2 3
B. No output is produced. 2 3 4
C. No output is produced. 1 2 3 4
D. An exception is thrown at runtime. 1 2 3
E. An exception is thrown at runtime. 2 3 4
F. An exception is thrown at runtime. 1 2 3 4
Solution : B
java Yippee --> 아무것도 호출 x
java Yippee 1 2 3 4 --> main을 통해 x=1부터 실행 , args[1] = 2 부터 시작
반응형
'자격증 > OCJP_ExamA' 카테고리의 다른 글
QUESTION 50 (0) | 2018.07.08 |
---|---|
QUESTION 49 (0) | 2018.07.08 |
QUESTION 47 (0) | 2018.07.08 |
QUESTION 46 (0) | 2018.07.08 |
QUESTION 45 (0) | 2018.07.08 |
@IT grow. :: IT grow.
#IT #먹방 #전자기기 #일상
#개발 #일상