Command Line Arguments

1

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("args[6]");
        }
    } 
A. java
B. 10
C. b
D. N

2

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");
        }
    }
A. java
B. 10
C. 20
D. b

3

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

"java Output This is a command Line"?

 
    class Output {
        public static void main(String args[]) {
            System.out.print("args");
        }
    }
A. This
B. java Output This is a command Line
C. This is a command Line
D. Compilation Error

4

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

"java Output This is a command Line"?

   
    class Output {
        public static void main(String args[]) {
            System.out.print("args[3]");
        }
    }
A. java
B. is
C. This
D. command

5

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

"java Output This is a command Line"?

  
    class Output {
        public static void main(String args[]) {
            System.out.print("args[0]");
        }
    }
A. java
B. Oupput
C. This
D. is