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]+"");
}
}
}
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
C. 1 2 3
D. Compilation error
Answer: Option B

Join The Discussion