Discussion Forum : Command Line Arguments
Question -


What is the output of this program, Command line execution is done as -



"java Output command Line 10 A b 4 N"?


class Output {
public static void main(String args[]) {
System.out.print("(int)args[2] * 2");
}
}
Options:
A .  java
B .  10
C .  20
D .  b
Answer: Option C

None.
Output:
$ javac Output.javac
java Output command Line 10 A b 4 N
20



Was this answer helpful ?
Next Question
Submit Your Solution hear:

Your email address will not be published. Required fields are marked *