adplus-dvertising
frame-decoration

Question

What is the output of the below Java program with command-line arguments?
public class CommandLineArguments2
{
  public static void main(String[] args)
  {
    System.out.println(args[1]);
  }
}

C:\folder>java CommandLineArguments2 TIGER

a.

CommandLineArguments2

b.

TIGER

c.

Compiler error

d.

None of the above

Answer: (c).Compiler error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the below Java program with command-line arguments?