Multiple choice technology

If MyProg.java were compiled as an application and then run from the command line as: java MyProg I like testswhat would be the value of args[ 1 ] inside the main( ) method?

  1. MyProg

  2. "I"

  3. "like"

  4. 3

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

When running a Java application from the command line, args[0] is the first command-line argument following the class name. For the command 'java MyProg I like tests', args[0] is 'I', args[1] is 'like', and args[2] is 'tests'.