adplus-dvertising
frame-decoration

Question

What will be the output of the program?
Note: The command-line invocation is
> java CommandArgsThree 1 2 3

public class CommandArgsThree 
{
    public static void main(String [] args) 
    {
        String [][] argCopy = new String[2][2];
        int x;
        argCopy[0] = args;
        x = argCopy[0].length;
        for (int y = 0; y < x; y++) 
        {
            System.out.print(" " + argCopy[0][y]);
        }
    }
}

a.

0 0

b.

1 2

c.

0 0 0

d.

1 2 3

Posted under Java Programming

Answer: (d).1 2 3

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the program? Note: The command-line invocation is > java CommandArgsThree 1 2 3

Similar Questions

Discover Related MCQs

Q. Java was designed by _________________.

Q. Earlier name of Java Programming language was

Q. Which of the following personality is called as father of Java Programming language

Q. Why OAK was renamed to Java ?

Q. Java was publicly released in _______________ .

Q. Which kind of language java is ?

Q. In the beginning, Java was created in order to

Q. Java is a ________ programming language.

Q. Which of the following is/are correct advantage of java?

Q. In which year, Sun Microsystems released much of its Java virtual machine?

Q. After first public release java was targeted at ______________________.

Q. First public implementation of java was _____________

Q. Basic aim of java was to solve the problem of connecting many household machines together. The was achieved using

Q. Sun Microsystems released the first public implementation as Java 1.0 in?

Q. Java SE 15 version released on?

Q. Java Source Code is compiled into ______________.

Q. Enums were introduced in?

Q. Which of the following is used to interpret and execute Java Applet Classes hosted by HTML.

Q. HTML based Java Documentary help can be accessed using ______________.

Q. Single line comment starts with _________ in Java.