Vidyalelo
Java Programming · Q84

Miscellaneous Java

Programming · Java Programming · question 84

Q84

What will be the output of the following Java snippet, if compiled and executed with command line argument "java abc 1 2 3"? public class abc static public void main(String [] xyz) for(int n=1;n<xyz.length; n++) System.out.println(xyz[n]+"");

A.
1 2
B.
2 3
Answer
C.
1 2 3
D.
Compilation error

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board