Hi All,
I new to java .I was going through java certification questions in javaprepare.com.
1.What all gets printed on the standard output when the class below is compiled and executed by entering "java test lets see what happens". Select the two correct answers.
public class test {
public static void main(String args[]) {
System.out.println(args[0]+" "+args.length);
}
}
ans:
A.java
B.test
C.lets
D.3
E.4
F.5
G.6
I thought the answer is A G.But what I am seeing on the web site C E.
Can anyone tell the right answer and explain me ?
I new to java .I was going through java certification questions in javaprepare.com.
1.What all gets printed on the standard output when the class below is compiled and executed by entering "java test lets see what happens". Select the two correct answers.
public class test {
public static void main(String args[]) {
System.out.println(args[0]+" "+args.length);
}
}
ans:
A.java
B.test
C.lets
D.3
E.4
F.5
G.6
I thought the answer is A G.But what I am seeing on the web site C E.
Can anyone tell the right answer and explain me ?