Given:
executed with this command:
java Main one two three
What is the output of this class?
A. The compilation fails.
B. 1) one
2) two
3) three
C. A java.lang.ArrayIndexOutOfBoundsException is thrown.
D. 1) one
E. nothing
Given:
executed with this command:
java Main one two three
What is the output of this class?
A. The compilation fails.
B. 1) one
2) two
3) three
C. A java.lang.ArrayIndexOutOfBoundsException is thrown.
D. 1) one
E. nothing
Answer would be E if you can execute the same code in complier
It states to run with arguments:
executed with this command:
java Main one two three
B is correct.
Correct Answer is B