Complete the code to declare the main method that accepts command line arguments.
public static void [1](String[] args) { }The main method in Java that accepts command line arguments must be named main.
Complete the code to print the first command line argument.
System.out.println(args[1]);Command line arguments are stored in an array, accessed by index with square brackets.
Fix the error in the main method declaration to accept command line arguments.
public static void main([1] args) { }The main method must accept an array of Strings, declared as String[] args.
Fill both blanks to declare the main method with command line arguments and print the number of arguments.
public static void [1](String[] [2]) { System.out.println([2].length); }
The main method is named main and the parameter name is commonly args. The length property gives the number of arguments.
Fill all three blanks to declare main, access the second argument, and print it.
public static void [1](String[] [2]) { System.out.println([2][3]); }
The main method is named main, the parameter is args, and the second argument is accessed with index 1.
