Question
Note: The command-line invocation is
> java CommandArgsTwo 1 2 3
public class CommandArgsTwo
{
public static void main(String [] argh)
{
int x;
x = argh.length;
for (int y = 1; y <= x; y++)
{
System.out.print(" " + argh[y]);
}
}
}
a.
0 1 2
b.
1 2 3
c.
0 0 0
d.
An exception is thrown at runtime
Posted under Java Programming
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 CommandArgsTwo 1 2 3
Similar Questions
Discover Related MCQs
Q. Java was designed by _________________.
View solution
Q. Earlier name of Java Programming language was
View solution
Q. Which of the following personality is called as father of Java Programming language
View solution
Q. Why OAK was renamed to Java ?
View solution
Q. Java was publicly released in _______________ .
View solution
Q. Which kind of language java is ?
View solution
Q. In the beginning, Java was created in order to
View solution
Q. Java is a ________ programming language.
View solution
Q. Which of the following is/are correct advantage of java?
View solution
Q. In which year, Sun Microsystems released much of its Java virtual machine?
View solution
Q. After first public release java was targeted at ______________________.
View solution
Q. First public implementation of java was _____________
View solution
Q. Basic aim of java was to solve the problem of connecting many household machines together. The was achieved using
View solution
Q. Sun Microsystems released the first public implementation as Java 1.0 in?
View solution
Q. Java SE 15 version released on?
View solution
Q. Java Source Code is compiled into ______________.
View solution
Q. Enums were introduced in?
View solution
Q. Which of the following is used to interpret and execute Java Applet Classes hosted by HTML.
View solution
Q. HTML based Java Documentary help can be accessed using ______________.
View solution
Q. Single line comment starts with _________ in Java.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!